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