UDPFramer implements Framer<IPPacket, UDPPacket> { public UDPFramer() { } UDPFramer(); @Override Protocol getProtocol(); @Override UDPPacket frame(final IPPacket parent, final Buffer buffer); @Override boolean accept(final Buffer data);  }
@Test public void testUdpFramer() throws Exception { final UDPFramer framer = new UDPFramer(); final UDPPacket udp = framer.frame(mock(IPPacket.class), this.udpFrameBuffer); assertThat(udp.getSourcePort(), is(5060)); assertThat(udp.getDestinationPort(), is(5090)); }