### Question:
StandaloneResourcePublisher implements ResourcePublisher { static int getPort() { return Integer.getInteger(DEFAULT_PORT_PROPERTY, DEFAULT_PORT); }  Endpoint publish(ServiceDomain domain, String context, List<Object> instances, Map<String, String> contextParams);  }### Answer:
@Test public void useDefaultPort() { final int port = new NettyJaxrsServer().getPort(); assertThat(port, is(equalTo(ResourcePublisher.DEFAULT_PORT))); }
@Test public void useConfiguredPort() { System.setProperty(ResourcePublisher.DEFAULT_PORT_PROPERTY, Integer.toString(TEST_PORT)); final int port = new NettyJaxrsServer().getPort(); assertThat(port, is(equalTo(TEST_PORT))); }