TCPFramer implements Framer<IPPacket, TCPPacket> { public TCPFramer() { } TCPFramer(); @Override Protocol getProtocol(); @Override TCPPacket frame(final IPPacket parent, final Buffer buffer); @Override boolean accept(final Buffer data);  }
@Test public void testTcpFramer() throws Exception { final TCPPacket tcp = this.framer.frame(mock(IPPacket.class), this.tcpFrameBuffer); assertThat(tcp.getSourcePort(), is(5060)); assertThat(tcp.getDestinationPort(), is(59409)); assertThat(tcp.getHeaderLength(), is(32)); }