### Question:
ApiResponse { public boolean isUnauthorized() { return httpResponseCode == 401; } ApiResponse(int httpCode); int getResponseCode(); boolean isSuccess(); boolean isUnauthorized();  }### Answer:
@Test public void isUnauthorized_shouldReturnTrueIfResponseCodeIs401() throws Exception { assertThat(new TestApiResponse(401, asStream("Access Denied")).isUnauthorized(), equalTo(true)); }