@Test
public void build() throws Exception {

    final Trip trip = new TripBuilderFactory()
            .setId(ID)
            .setUuid(TRIP_UUID)
            .setDirectory(mStorageManager.getFile(NAME))
            .setStartDate(START_DATE)
            .setEndDate(END_DATE)
            .setStartTimeZone(START_TIMEZONE)
            .setEndTimeZone(END_TIMEZONE)
            .setComment(COMMENT)
            .setCostCenter(COST_CENTER)
            .setDefaultCurrency(CURRENCY_CODE, mPreferences.get(UserPreference.General.DefaultCurrency))
            .setSyncState(mGetSyncState)
            .setNameHiddenFromAutoComplete(NAME_HIDDEN_FROM_AUTO_COMPLETE)
            .setCommentHiddenFromAutoComplete(COMMENT_HIDDEN_FROM_AUTO_COMPLETE)
            .setCostCenterHiddenFromAutoComplete(COST_CENTER_HIDDEN_FROM_AUTO_COMPLETE)
            .build();
    assertEquals(trip, mTripDatabaseAdapter.build(mTrip, ID, TRIP_UUID, mock(DatabaseOperationMetadata.class)));
    assertEquals(trip.getSyncState(), mTripDatabaseAdapter.build(mTrip, ID, TRIP_UUID, mock(DatabaseOperationMetadata.class)).getSyncState());
}