@Override
    public int encode(PortNumber resource) {
        return (int) resource.toLong();
    }
@Test
    public void testEncode() {
        assertThat(sut.encode(PortNumber.portNumber(100)), is(100));
    }