### Question:
CalendarBuilder implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!request.equals(Calendar.class)) { return new NoSpecimen(); } Object dateResult = context.resolve(Date.class); if (dateResult instanceof NoSpecimen) { return new NoSpecimen(); } Date date = (Date) dateResult; GregorianCalendar calendar = new GregorianCalendar(); calendar.setTime(date); return calendar; }  @Override Object create(Object request, SpecimenContext context);  }### Answer:
@Test public void non_calendar_type_request_returns_no_specimen() { Object result = this.builder.create(String.class, this.mockContext); assertEquals(new NoSpecimen(), result); }
@Test public void calls_context_to_resolve_a_date() { this.builder.create(Calendar.class, mockContext); verify(this.mockContext).resolve(Date.class); }
@Test public void returns_gregorian_calendar_with_resolved_date() { Object result = this.builder.create(Calendar.class, mockContext); assertTrue(result instanceof GregorianCalendar); assertEquals(date, ((Calendar) result).getTime()); }