@Override
  public CalendarModel apply(Map<String, Object> calendar, TransformerContext context) {
    String id = (String) calendar.get("id");
    if (id == null) {
      context.problem("Calendar id not found");
      return null;
    }

    String name = (String) calendar.get("name");
    if (name == null) {
      context.problem("Calendar name not found");
      return null;
    }
    return new CalendarModel(
        id, name, name); // use name as description since it does not exist in Office
  }
@Test
  @SuppressWarnings("unchecked")
  public void testTransform() throws IOException {
    Map<String, Object> rawEvent = mapper.readValue(SAMPLE_CALENDAR, Map.class);

    CalendarModel calendar = transformer.apply(rawEvent, context);

    assertEquals("123", calendar.getId());
    assertEquals("Calendar", calendar.getName());
    assertEquals("Calendar", calendar.getDescription());
  }