@Test
public void handleDelete() {

    when(driveStreamsManager.deleteDriveFile(syncState1, true)).thenReturn(Single.just(newSyncState1));
    when(syncState1.isSynced(SyncProvider.GoogleDrive)).thenReturn(false);
    when(syncState1.isMarkedForDeletion(SyncProvider.GoogleDrive)).thenReturn(true);
    driveReceiptsManager.handleDelete(receipt1);
    verify(receiptTableController).delete(receiptCaptor.capture(), operationMetadataCaptor.capture());
    assertEquals(receipt1, receiptCaptor.getValue());
    assertEquals(newSyncState1, receiptCaptor.getValue().getSyncState());
    assertEquals(OperationFamilyType.Sync, operationMetadataCaptor.getValue().getOperationFamilyType());
}