OASURLParser { public String getPort() { return port; } OASURLParser(String oasURL); String getAuthorityWithScheme(); String getHost(); String getJaxRSAppBase(); String getPort(); String getScheme(); String getServerBaseURL();  }
@Test public void testGetPort() throws MalformedURLException { OASURLParser oasURLParser = new OASURLParser(OPEN_API_URL); Assert.assertEquals("8080", oasURLParser.getPort()); }
@Test public void testGetPortWhenDefaultPort() throws MalformedURLException { OASURLParser oasURLParser = new OASURLParser( "http: "/openapi.json"); Assert.assertEquals("", oasURLParser.getPort()); }