### Question:
ToCalendarModelTransformer implements BiFunction<Map<String, Object>, TransformerContext, CalendarModel> { @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); }  @Override CalendarModel apply(Map<String, Object> calendar, TransformerContext context);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testTransform() throws IOException { Map<String, Object> rawEvent = mapper.readValue(SAMPLE_CALENDAR, Map.class); CalendarModel calendar = transformer.apply(rawEvent, context); Assert.assertEquals("123", calendar.getId()); Assert.assertEquals("Calendar", calendar.getName()); Assert.assertEquals("Calendar", calendar.getDescription()); }