@Test
public void setAndInitializeSyncProvider() {

    when(mSyncProviderStore.setSyncProvider(any(SyncProvider.class))).thenReturn(true);
    mBackupProvidersManager.setAndInitializeSyncProvider(SyncProvider.GoogleDrive, mFragmentActivity);
    verify(mNoneBackupProvider).deinitialize();
    verify(mDriveBackupProvider).initialize(mFragmentActivity);
    // And confirm our internal refs now work
    mBackupProvidersManager.onActivityResult(0, 0, null);
    verify(mDriveBackupProvider).onActivityResult(0, 0, null);
    mBackupProvidersManager.deinitialize();
    verify(mDriveBackupProvider).deinitialize();
    mBackupProvidersManager.initialize(mFragmentActivity);
    verify(mDriveBackupProvider, times(2)).initialize(mFragmentActivity);
    verify(mBackupProviderChangeListener1).onProviderChanged(SyncProvider.GoogleDrive);
    mBackupProvidersManager.getRemoteBackups();
    verify(mDriveBackupProvider).getRemoteBackups();
    mBackupProvidersManager.getDeviceSyncId();
    verify(mDriveBackupProvider).getDeviceSyncId();
    verifyZeroInteractions(mBackupProviderChangeListener2);
}