TextApplication { public String getUri() { if (uri == null) { return null; } return uri.toString(); }  URI getUriObject(); int getPort(); void setPort(final int portNumber); String getUri(); void setUri(final String applicationUri);  }
@Test public void testGetUri() { final TextApplication application1 = new TextApplication(); application1.setUri("http:localhost:8080"); Assert.assertEquals("http:localhost:8080", application1.getUri()); final TextApplication application2 = new TextApplication(); Assert.assertNull(application2.getUri()); }