@Test
public void uploadFileToDrive() throws Exception {

    final String id = "id";
    final java.io.File file = new java.io.File("/");
    when(driveDataStreams.getSmartReceiptsFolder()).thenReturn(Observable.just(driveFile));
    when(driveDataStreams.createFileInFolder(driveFile, file)).thenReturn(Single.just(driveFile));
    when(driveFile.getId()).thenReturn(id);
    final TestObserver<Identifier> testObserver = driveStreamsManager.uploadFileToDrive(file).test();
    testObserver.assertValue(new Identifier(id));
    testObserver.assertComplete();
    testObserver.assertNoErrors();
}