### Question:
SubTypeRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!request.equals(baseClass)) { return new NoSpecimen(); } return context.resolve(this.subClass); } SubTypeRelay(Class baseClass, Class subClass); @Override Object create(Object request, SpecimenContext context);  }### Answer:
@Test public void non_class_request_returns_no_specimen() { Object result = builder.create("string", mockContext); assertEquals(new NoSpecimen(), result); }
@Test public void request_class_does_not_equal_base_class_returns_no_specimen() { Object result = builder.create(Integer.class, mockContext); assertEquals(new NoSpecimen(), result); }
@Test public void request_class_equals_base_class_passes_sub_class_to_context() { builder.create(List.class, mockContext); verify(mockContext).resolve(ArrayList.class); }