### Question:
ConnectTrial { @Nullable public String getResponseFilename() { return responseFilename; } 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 getResponseFilename() throws IOException { connectTrial.executeTrial(); assertThat(connectTrial.getResponseFilename()).isNull(); when(connected.getResponseHeaderField(CONTENT_DISPOSITION)) .thenReturn("attachment; filename=\"hello world\""); connectTrial.executeTrial(); assertThat(connectTrial.getResponseFilename()).isEqualTo("hello world"); when(connected.getResponseHeaderField(CONTENT_DISPOSITION)) .thenReturn("attachment; filename=\"hello world\""); connectTrial.executeTrial(); assertThat(connectTrial.getResponseFilename()).isEqualTo("hello world"); when(connected.getResponseHeaderField(CONTENT_DISPOSITION)) .thenReturn("attachment; filename=genome.jpeg\nabc"); connectTrial.executeTrial(); assertThat(connectTrial.getResponseFilename()).isEqualTo("genome.jpeg"); when(connected.getResponseHeaderField(CONTENT_DISPOSITION)) .thenReturn("attachment; filename=../data/data/genome.png"); thrown.expect(DownloadSecurityException.class); thrown.expectMessage("The filename [../data/data/genome.png] from the response is not " + "allowable, because it contains '../', which can raise the directory traversal " + "vulnerability"); connectTrial.executeTrial(); when(connected.getResponseHeaderField(CONTENT_DISPOSITION)) .thenReturn("attachment; filename=a/b/../abc"); thrown.expect(DownloadSecurityException.class); thrown.expectMessage("The filename [a/b/../abc] from the response is not " + "allowable, because it contains '../', which can raise the directory traversal " + "vulnerability"); connectTrial.executeTrial(); }