@Test public void parseResponse_responseHasNullReturnResult_IllegalArgumentException() throws Exception { final HttpClientResponse response = mock(HttpClientResponse.class); when(response.getStatusCode()).thenReturn((short) 200); when(response.getReturnResult()).thenReturn(null); this.exception.expect(IllegalArgumentException.class); this.sut.parseResponse(response); }
public @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response) throws SAXException, IOException, AbbyySdkException { if (response.getStatusCode() == null || response.getReturnResult() == null) { throw new IllegalArgumentException(ExceptionMsgs.INVALID_HTTP_RESPONSE); } return parseResponse(response.getStatusCode(), response.getReturnResult()); }
AbbyyResponseParser { public @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response) throws SAXException, IOException, AbbyySdkException { if (response.getStatusCode() == null || response.getReturnResult() == null) { throw new IllegalArgumentException(ExceptionMsgs.INVALID_HTTP_RESPONSE); } return parseResponse(response.getStatusCode(), response.getReturnResult()); } }
AbbyyResponseParser { public @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response) throws SAXException, IOException, AbbyySdkException { if (response.getStatusCode() == null || response.getReturnResult() == null) { throw new IllegalArgumentException(ExceptionMsgs.INVALID_HTTP_RESPONSE); } return parseResponse(response.getStatusCode(), response.getReturnResult()); } AbbyyResponseParser();  AbbyyResponseParser(@Nullable AbbyyResponseValidator validator); }
AbbyyResponseParser { public @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response) throws SAXException, IOException, AbbyySdkException { if (response.getStatusCode() == null || response.getReturnResult() == null) { throw new IllegalArgumentException(ExceptionMsgs.INVALID_HTTP_RESPONSE); } return parseResponse(response.getStatusCode(), response.getReturnResult()); } AbbyyResponseParser();  AbbyyResponseParser(@Nullable AbbyyResponseValidator validator); @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response); }
AbbyyResponseParser { public @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response) throws SAXException, IOException, AbbyySdkException { if (response.getStatusCode() == null || response.getReturnResult() == null) { throw new IllegalArgumentException(ExceptionMsgs.INVALID_HTTP_RESPONSE); } return parseResponse(response.getStatusCode(), response.getReturnResult()); } AbbyyResponseParser();  AbbyyResponseParser(@Nullable AbbyyResponseValidator validator); @NotNull AbbyyResponse parseResponse(@NotNull HttpClientResponse response);  }