@Test public void isSuccess_shouldReturnTrueIfResponseCodeIsInThe200Range() throws Exception { assertThat(new TestApiResponse(200, asStream(GENERIC_XML)).isSuccess(), equalTo(true)); assertThat(new TestApiResponse(201, asStream(GENERIC_XML)).isSuccess(), equalTo(true)); assertThat(new TestApiResponse(299, asStream(GENERIC_XML)).isSuccess(), equalTo(true)); }
public boolean isSuccess() { return httpResponseCode >= 200 && httpResponseCode < 300; }
ApiResponse { public boolean isSuccess() { return httpResponseCode >= 200 && httpResponseCode < 300; } }
ApiResponse { public boolean isSuccess() { return httpResponseCode >= 200 && httpResponseCode < 300; } ApiResponse(int httpCode); }
ApiResponse { public boolean isSuccess() { return httpResponseCode >= 200 && httpResponseCode < 300; } ApiResponse(int httpCode); int getResponseCode(); boolean isSuccess(); boolean isUnauthorized(); }
ApiResponse { public boolean isSuccess() { return httpResponseCode >= 200 && httpResponseCode < 300; } ApiResponse(int httpCode); int getResponseCode(); boolean isSuccess(); boolean isUnauthorized();  }