@Test
public void writeUnsynced() throws Exception {

    final String sync = "sync";
    final ContentValues syncValues = new ContentValues();
    syncValues.put(sync, sync);
    when(mSyncStateAdapter.writeUnsynced(mSyncState)).thenReturn(syncValues);
    final ContentValues contentValues = mTripDatabaseAdapter.write(mTrip, new DatabaseOperationMetadata());
    assertEquals(NAME, contentValues.getAsString("name"));
    assertEquals(START_DATE, (long) contentValues.getAsLong("from_date"));
    assertEquals(END_DATE, (long) contentValues.getAsLong("to_date"));
    assertEquals(START_TIMEZONE, contentValues.getAsString("from_timezone"));
    assertEquals(END_TIMEZONE, contentValues.getAsString("to_timezone"));
    assertEquals(COMMENT, contentValues.getAsString("trips_comment"));
    assertEquals(COST_CENTER, contentValues.getAsString("trips_cost_center"));
    assertEquals(CURRENCY_CODE, contentValues.getAsString("trips_default_currency"));
    assertEquals(TRIP_UUID.toString(), contentValues.getAsString("entity_uuid"));
    assertEquals(NAME_HIDDEN_FROM_AUTO_COMPLETE, contentValues.getAsBoolean("name_hidden_auto_complete"));
    assertEquals(COMMENT_HIDDEN_FROM_AUTO_COMPLETE, contentValues.getAsBoolean("comment_hidden_auto_complete"));
    assertEquals(COST_CENTER_HIDDEN_FROM_AUTO_COMPLETE, contentValues.getAsBoolean("costcenter_hidden_auto_complete"));
    assertEquals(sync, contentValues.getAsString(sync));
    assertFalse(contentValues.containsKey("miles_new"));
    assertFalse(contentValues.containsKey("trips_filters"));
    assertFalse(contentValues.containsKey("trip_processing_status"));
    assertFalse(contentValues.containsKey("price"));
}