@Test public void non_specimen_type_request_returns_no_specimen() { Object result = this.arrayRelay.create("string", mockSpecimenContext); assertEquals(new NoSpecimen(), result); }
@Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType)request; if(!specimenType.getRawType().isArray()) { return new NoSpecimen(); } Class clazz = specimenType.getRawType(); return buildArray(clazz, context); }
ArrayRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType)request; if(!specimenType.getRawType().isArray()) { return new NoSpecimen(); } Class clazz = specimenType.getRawType(); return buildArray(clazz, context); } }
ArrayRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType)request; if(!specimenType.getRawType().isArray()) { return new NoSpecimen(); } Class clazz = specimenType.getRawType(); return buildArray(clazz, context); }  }
ArrayRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType)request; if(!specimenType.getRawType().isArray()) { return new NoSpecimen(); } Class clazz = specimenType.getRawType(); return buildArray(clazz, context); }  @Override Object create(Object request, SpecimenContext context); }
ArrayRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof SpecimenType)) { return new NoSpecimen(); } SpecimenType specimenType = (SpecimenType)request; if(!specimenType.getRawType().isArray()) { return new NoSpecimen(); } Class clazz = specimenType.getRawType(); return buildArray(clazz, context); }  @Override Object create(Object request, SpecimenContext context);  }