StandaloneResourcePublisher implements ResourcePublisher { static int getPort() { return Integer.getInteger(DEFAULT_PORT_PROPERTY, DEFAULT_PORT); }  Endpoint publish(final ServiceDomain domain, final String context, final List<Object> instances, final Map<String, String> contextParams);  }
@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))); }