@Test public void setIsDoneReturnsTrueIffThrowable() { Throwable throwable = mock(Throwable.class); assertThat(cut.isDone(), is(false)); cut.setThrowable(throwable); assertThat(cut.isDone(), is(true)); }
@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 setIsDoneReturnsFalseIfCancelled() { cut.setCancelled(); assertThat(cut.isDone(), is(false)); }