aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/org/traccar/helper/ChannelBufferToolsTest.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/org/traccar/helper/ChannelBufferToolsTest.java b/test/org/traccar/helper/ChannelBufferToolsTest.java
index 2d1c1f0ca..744d3eb43 100644
--- a/test/org/traccar/helper/ChannelBufferToolsTest.java
+++ b/test/org/traccar/helper/ChannelBufferToolsTest.java
@@ -1,6 +1,8 @@
package org.traccar.helper;
+import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBufferFactory;
+import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.buffer.HeapChannelBufferFactory;
import static org.junit.Assert.*;
import org.junit.Test;
@@ -13,7 +15,7 @@ public class ChannelBufferToolsTest {
public void testReadHexInteger() {
byte[] buf = {0x01, (byte) 0x90, 0x34};
int result = ChannelBufferTools.readHexInteger(
- factory.getBuffer(buf, 0, buf.length), 5);
+ ChannelBuffers.wrappedBuffer(buf), 5);
assertEquals(1903, result);
}
@@ -21,7 +23,7 @@ public class ChannelBufferToolsTest {
public void testReadHexString() {
byte[] buf = {0x01, (byte) 0x90, 0x34};
String result = ChannelBufferTools.readHexString(
- factory.getBuffer(buf, 0, buf.length), 5);
+ ChannelBuffers.wrappedBuffer(buf), 5);
assertEquals("01903", result);
result = String.valueOf(Long.parseLong(result));