@Test public void shouldHandlePlainTextResponseFor() throws Exception { mWebMockRule.enqueue( MockResponseFactory.create200().setBody("5.5.0") ); String editionName = objectUnderTest.requestVersion(); assertThat(editionName, is("5.5.0")); 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/version'", recordedRequest, hasPath("/rest_v2/serverInfo/version")); }
@NotNull public String requestVersion() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/version"); }
ServerRestApi { @NotNull public String requestVersion() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/version"); } }
ServerRestApi { @NotNull public String requestVersion() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/version"); } ServerRestApi(NetworkClient networkClient); }
ServerRestApi { @NotNull public String requestVersion() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/version"); } 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 requestVersion() throws IOException, HttpException { return plainRequest("rest_v2/serverInfo/version"); } 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();  }