### Question:
ConnectTrial { public boolean isAcceptRange() { return this.acceptRange; } 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 isAcceptRange() throws Exception { when(connected.getResponseCode()).thenReturn(HttpURLConnection.HTTP_PARTIAL); connectTrial.executeTrial(); assertThat(connectTrial.isAcceptRange()).isTrue(); when(connected.getResponseCode()).thenReturn(0); connectTrial.executeTrial(); assertThat(connectTrial.isAcceptRange()).isFalse(); when(connected.getResponseHeaderField(ACCEPT_RANGES)).thenReturn("bytes"); connectTrial.executeTrial(); assertThat(connectTrial.isAcceptRange()).isTrue(); }