@Test
public void updateDriveFileWithSyncState() throws Exception {

    final java.io.File file = new java.io.File("/");
    when(currentSyncState.getSyncId(SyncProvider.GoogleDrive)).thenReturn(identifier);
    when(driveDataStreams.updateFile(identifier, file)).thenReturn(Single.just(driveFile));
    when(driveStreamMappings.postUpdateSyncState(driveFile)).thenReturn(newSyncState);
    final TestObserver<SyncState> testObserver = driveStreamsManager.updateDriveFile(currentSyncState, file).test();
    testObserver.assertValue(newSyncState);
    testObserver.assertComplete();
    testObserver.assertNoErrors();
}