CliService { String getPort(URL url) { int port = url.getPort(); if (port == -1) { port = url.getDefaultPort(); } return Integer.toString(port); }  Optional<FileSystemResource> getLocalCliFile(); String getCliUrl(); String generateInstallCliScript(String requestUrl, String installDirectory); String getVersion();  }
@Test public void getPort() throws IOException { assertEquals("443", cliService.getPort(new URL("https: assertEquals("8080", cliService.getPort(new URL("http: }