@Test public void testIsSuccessWith500() { final HttpResponse response = mock(HttpResponse.class); final StatusLine statusLine = mock(StatusLine.class); Mockito.doReturn(statusLine).when(response).getStatusLine(); Mockito.doReturn(500).when(statusLine).getStatusCode(); final boolean result = new QuickPulseNetworkHelper().isSuccess(response); assertFalse(result); }
public boolean isSuccess(HttpResponse response) { final int responseCode = response.getStatusLine().getStatusCode(); return responseCode == 200; }
QuickPulseNetworkHelper { public boolean isSuccess(HttpResponse response) { final int responseCode = response.getStatusLine().getStatusCode(); return responseCode == 200; } }
QuickPulseNetworkHelper { public boolean isSuccess(HttpResponse response) { final int responseCode = response.getStatusLine().getStatusCode(); return responseCode == 200; }  }
QuickPulseNetworkHelper { public boolean isSuccess(HttpResponse response) { final int responseCode = response.getStatusLine().getStatusCode(); return responseCode == 200; }  HttpPost buildRequest(Date currentDate, String address); boolean isSuccess(HttpResponse response); QuickPulseStatus getQuickPulseStatus(HttpResponse response); }
QuickPulseNetworkHelper { public boolean isSuccess(HttpResponse response) { final int responseCode = response.getStatusLine().getStatusCode(); return responseCode == 200; }  HttpPost buildRequest(Date currentDate, String address); boolean isSuccess(HttpResponse response); QuickPulseStatus getQuickPulseStatus(HttpResponse response);  }