@Test public void writeWithNullId() throws Exception { when(mSyncState.getSyncId(SyncProvider.GoogleDrive)).thenReturn(null); final ContentValues contentValues = mSyncStateAdapter.write(mSyncState); assertNull(contentValues.getAsString("drive_sync_id")); assertEquals(DRIVE_IS_SYNCED, contentValues.getAsBoolean("drive_is_synced")); assertEquals(DRIVE_IS_MARKED, contentValues.getAsBoolean("drive_marked_for_deletion")); assertEquals(LAST_LOCAL_MODIFICATION_TIME, (long) contentValues.getAsLong("last_local_modification_time")); }
@NonNull public ContentValues write(@NonNull SyncState syncState) { return write(syncState, false); }
SyncStateAdapter { @NonNull public ContentValues write(@NonNull SyncState syncState) { return write(syncState, false); } }
SyncStateAdapter { @NonNull public ContentValues write(@NonNull SyncState syncState) { return write(syncState, false); } @Inject  SyncStateAdapter(); }
SyncStateAdapter { @NonNull public ContentValues write(@NonNull SyncState syncState) { return write(syncState, false); } @Inject  SyncStateAdapter(); @NonNull SyncState read(@NonNull Cursor cursor); @NonNull ContentValues writeUnsynced(@NonNull SyncState syncState); @NonNull ContentValues write(@NonNull SyncState syncState); @NonNull ContentValues write(@NonNull SyncState syncState, boolean isUnsynced); @NonNull ContentValues deleteSyncData(@NonNull SyncProvider syncProvider); @NonNull SyncState get(@NonNull SyncState syncState, @NonNull DatabaseOperationMetadata databaseOperationMetadata); }
SyncStateAdapter { @NonNull public ContentValues write(@NonNull SyncState syncState) { return write(syncState, false); } @Inject  SyncStateAdapter(); @NonNull SyncState read(@NonNull Cursor cursor); @NonNull ContentValues writeUnsynced(@NonNull SyncState syncState); @NonNull ContentValues write(@NonNull SyncState syncState); @NonNull ContentValues write(@NonNull SyncState syncState, boolean isUnsynced); @NonNull ContentValues deleteSyncData(@NonNull SyncProvider syncProvider); @NonNull SyncState get(@NonNull SyncState syncState, @NonNull DatabaseOperationMetadata databaseOperationMetadata);  }