@Test
public void syncDatabaseError() {

    final Exception e = new Exception();
    when(mDriveStreamsManager.uploadFileToDrive(mDatabaseFile)).thenReturn(Single.error(e));
    mDriveDatabaseManager.syncDatabase();
    verify(mGoogleDriveSyncMetadata, never()).setDatabaseSyncIdentifier(any(Identifier.class));
    verify(mAnalytics).record(any(ErrorEvent.class));
}