@Test
public void requestFileDealsWithExceptionReturningAnEmptyRequest() throws Exception {

    Path targetDirectory = temporaryFolder.newFolder("target").toPath();
    when(httpHelperMock.downloadFile(anyString(), eq(targetDirectory), anyString())).thenThrow(new IOException("Failed to download"));
    Optional<File> file = hr.requestFile(mavenCoordinate, targetDirectory, classifierInformation);
    assertThat(file).isEmpty();
}