Server { public Optional<String> getClusterNodeName() { return Optional.ofNullable(clusterNodeName); } Server(Locators locators, File home, Edition edition, Version version, HttpUrl url, int searchPort, @Nullable String clusterNodeName); File getHome(); Edition getEdition(); String getUrl(); Version version(); @Deprecated File getLogs(); File getAppLogs(); File getWebLogs(); File getCeLogs(); File getEsLogs(); int getSearchPort(); Optional<String> getClusterNodeName(); Server restoreProfile(Location backup); void provisionProject(String projectKey, String projectName); @Deprecated String post(String relativePath, Map<String, Object> params); HttpCall newHttpCall(String relativePath); void associateProjectToQualityProfile(String projectKey, String languageKey, String profileName); static final String ADMIN_LOGIN; static final String ADMIN_PASSWORD; }
@Test public void getClusterNodeName_returns_constructor_parameter() { Server standaloneServer = newServerForClusterNodeName(null); assertThat(standaloneServer.getClusterNodeName()).isEmpty(); String nodeName = "fooBar"; Server clusterServer = newServerForClusterNodeName(nodeName); assertThat(clusterServer.getClusterNodeName()).contains(nodeName); }