/** Tests deserialize and getters. */ @Test public void testDeserialize() throws Exception { LLC llc = deserializer.deserialize(bytes, 0, bytes.length); assertEquals(dsap, llc.getDsap()); assertEquals(ssap, llc.getSsap()); assertEquals(ctrl, llc.getCtrl()); }
/** Tests toString. */ @Test public void testToStringLLC() throws Exception { LLC llc = deserializer.deserialize(bytes, 0, bytes.length); String str = llc.toString(); assertTrue(StringUtils.contains(str, "dsap=" + dsap)); assertTrue(StringUtils.contains(str, "ssap=" + ssap)); assertTrue(StringUtils.contains(str, "ctrl=" + ctrl)); }
@Before public void setUp() throws Exception { deserializer = LLC.deserializer(); ByteBuffer bb = ByteBuffer.allocate(LLC.LLC_HEADER_LENGTH); bb.put(dsap); bb.put(ssap); bb.put(ctrl); bytes = bb.array(); }