@Test
public void carbUserRecordShouldBeConverted() throws Exception {

  DexcomAdapterService dexcomAdapterService = new DexcomAdapterService();
  SyncData syncData = dexcomAdapterService.convertData(
      new DexcomSyncData(EMPTY_GLUCOSE_READ_RECORDS,
          Arrays.asList(new UserEventRecord(1000L, 2000L, 1500L, UserEventRecord.UserEventType.CARBS,
              (byte) 0, 12)),
          new ManufacturingParameters(SERIAL_NUMBER, "partNumber", HARDWARE_REVISION, "2013-10-18 10:10", HARDWARE_ID),
              TEST_TIME));
  FoodEvent foodEvent = new FoodEvent(internalTimeFromSeconds(1000L), localDateTimeFromSeconds(2000L),
      localDateTimeFromSeconds(1500L), 12f, 0f);
  SyncData expectedSyncData = new SyncData(EMPTY_GLUCOSE_READS, EMPTY_INSULIN_INJECTIONS, Arrays.asList(foodEvent),
      EMPTY_EXERCISE_SESSIONS, new DeviceInfo(SERIAL_NUMBER, HARDWARE_ID, HARDWARE_REVISION),
          TEST_TIME);
  assertThat(syncData, is(equalTo(expectedSyncData)));
}