### Question:
ConnectTrial { public boolean isEtagOverdue() { return info.getEtag() != null && !info.getEtag().equals(responseEtag); } ConnectTrial(@NonNull DownloadTask task, @NonNull BreakpointInfo info); void executeTrial(); long getInstanceLength(); boolean isAcceptRange(); boolean isChunked(); @Nullable String getResponseEtag(); @Nullable String getResponseFilename(); int getResponseCode(); boolean isEtagOverdue();  }### Answer:
@Test public void isEtagOverdue() throws Exception { when(connected.getResponseHeaderField(ETAG)).thenReturn(etag); connectTrial.executeTrial(); assertThat(connectTrial.isEtagOverdue()).isFalse(); when(connected.getResponseHeaderField(ETAG)).thenReturn("newEtag"); connectTrial.executeTrial(); assertThat(connectTrial.isEtagOverdue()).isTrue(); assertThat(connectTrial.getResponseEtag()).isEqualTo("newEtag"); }