@Test
public void downloadErrorIsForwarded() throws Exception {

    final String fileId = "fileId";
    final Exception exception = new Exception("test");
    final java.io.File file = new java.io.File("/");
    when(driveDataStreams.download(fileId, file)).thenReturn(Single.error(exception));
    final TestObserver<Optional<java.io.File>> testObserver = driveStreamsManager.download(fileId, file).test();
    testObserver.assertNoValues();
    testObserver.assertNotComplete();
    testObserver.assertError(Exception.class);
    verify(driveErrorStream).onNext(Optional.of(criticalSyncError));
}