public void testGetApplicationData_0() throws Exception { byte data[] = {0, 10, 20, 40, 50}; InetAddress addr1 = InetAddress.getByAddress(new byte[] {127, 0, 0, 1}); InetAddress addr2 = InetAddress.getByAddress(new byte[] {127, 0, 0, 2}); ChannelBinding cb = new ChannelBinding(addr1, addr2, data); assertTrue(Arrays.equals(new byte[] {0, 10, 20, 40, 50}, cb.getApplicationData())); }
public void testGetApplicationData_1() { ChannelBinding cb = new ChannelBinding(null); assertNull(cb.getApplicationData()); }
public void testGetApplicationData() { byte data[] = {0, 1, 2, 10, 20}; ChannelBinding cb = new ChannelBinding(data); assertTrue(Arrays.equals(new byte[] {0, 1, 2, 10, 20}, cb.getApplicationData())); }