@Test
public void write() throws Exception {

    final String sync = "sync";
    final ContentValues syncValues = new ContentValues();
    syncValues.put(sync, sync);
    when(mSyncStateAdapter.write(mSyncState)).thenReturn(syncValues);
    final ContentValues contentValues = mPaymentMethodDatabaseAdapter.write(mPaymentMethod, new DatabaseOperationMetadata(OperationFamilyType.Sync));
    assertEquals(METHOD, contentValues.getAsString("method"));
    assertEquals(sync, contentValues.getAsString(sync));
    assertEquals(CUSTOM_ORDER, (int) contentValues.getAsInteger("custom_order_id"));
    assertEquals(PM_UUID.toString(), contentValues.getAsString("entity_uuid"));
    assertFalse(contentValues.containsKey("id"));
}