@Test public void shouldHandlePlainTextResponseForEditionName() throws Exception { mWebMockRule.enqueue( MockResponseFactory.create200().setBody("Enterprise for AWS") ); String editionName = objectUnderTest.requestEditionName(); assertThat(editionName, is("Enterprise for AWS")); RecordedRequest recordedRequest = mWebMockRule.get().takeRequest(); assertThat("Should accept text plain header", recordedRequest, containsHeader("Accept", "text/plain; charset=UTF-8")); assertThat("Should have path '/rest_v2/serverInfo/editionName'", recordedRequest, hasPath("/rest_v2/serverInfo/editionName")); }
@NotNull public String requestEditionName() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/editionName"); }
ServerRestApi { @NotNull public String requestEditionName() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/editionName"); } }
ServerRestApi { @NotNull public String requestEditionName() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/editionName"); } ServerRestApi(NetworkClient networkClient); }
ServerRestApi { @NotNull public String requestEditionName() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/editionName"); } ServerRestApi(NetworkClient networkClient); @NotNull ServerInfoData requestServerInfo(); @NotNull String requestBuild(); @NotNull String requestEdition(); @NotNull String requestVersion(); @NotNull String requestFeatures(); @NotNull String requestEditionName(); @NotNull String requestLicenseType(); @NotNull String requestExpiration(); @NotNull String requestDateFormatPattern(); @NotNull String requestDateTimeFormatPattern(); }
ServerRestApi { @NotNull public String requestEditionName() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/editionName"); } ServerRestApi(NetworkClient networkClient); @NotNull ServerInfoData requestServerInfo(); @NotNull String requestBuild(); @NotNull String requestEdition(); @NotNull String requestVersion(); @NotNull String requestFeatures(); @NotNull String requestEditionName(); @NotNull String requestLicenseType(); @NotNull String requestExpiration(); @NotNull String requestDateFormatPattern(); @NotNull String requestDateTimeFormatPattern();  }