Beispiel #1
0
 @Test
 public void setIsDoneReturnsTrueIffResponse() {
   Response response = mock(Response.class);
   assertThat(cut.isDone(), is(false));
   cut.setResponse(response);
   assertThat(cut.isDone(), is(true));
 }
Beispiel #2
0
 @Test
 public void setResponseLeadsToResponse()
     throws CancellationException, InterruptedException, ExecutionException {
   Response response = mock(Response.class);
   cut.setResponse(response);
   assertThat(cut.get(), is(response));
 }