@Test public void isUnauthorized_shouldReturnTrueIfResponseCodeIs401() throws Exception { assertThat(new TestApiResponse(401).isUnauthorized(), equalTo(true)); }
public boolean isUnauthorized() { return httpResponseCode == 401; }
ApiResponse { public boolean isUnauthorized() { return httpResponseCode == 401; } }
ApiResponse { public boolean isUnauthorized() { return httpResponseCode == 401; } ApiResponse(int httpCode);  ApiResponse(int httpCode, Map<String, List<String>> headers); }
ApiResponse { public boolean isUnauthorized() { return httpResponseCode == 401; } ApiResponse(int httpCode);  ApiResponse(int httpCode, Map<String, List<String>> headers); abstract void consumeResponse(InputStream responseBody); int getHttpResponseCode(); Map<String, List<String>> getHeaders(); boolean isSuccess(); boolean isUnauthorized(); }
ApiResponse { public boolean isUnauthorized() { return httpResponseCode == 401; } ApiResponse(int httpCode);  ApiResponse(int httpCode, Map<String, List<String>> headers); abstract void consumeResponse(InputStream responseBody); int getHttpResponseCode(); Map<String, List<String>> getHeaders(); boolean isSuccess(); boolean isUnauthorized();  }