@Test public void returns_no_specimen_if_context_returns_no_specimen() { when(mockSpecimenContext.resolve(String.class)).thenReturn(new NoSpecimen()); Object result = this.relay.create(new MultipleRequest(String.class), this.mockSpecimenContext); assertEquals(new NoSpecimen(), result); }
@Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof MultipleRequest)) { return new NoSpecimen(); } MultipleRequest multipleRequest = (MultipleRequest) request; return buildArrayList(multipleRequest, context); }
MultipleSpecimenRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof MultipleRequest)) { return new NoSpecimen(); } MultipleRequest multipleRequest = (MultipleRequest) request; return buildArrayList(multipleRequest, context); } }
MultipleSpecimenRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof MultipleRequest)) { return new NoSpecimen(); } MultipleRequest multipleRequest = (MultipleRequest) request; return buildArrayList(multipleRequest, context); } MultipleSpecimenRelay(MultipleCount multipleCount); }
MultipleSpecimenRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof MultipleRequest)) { return new NoSpecimen(); } MultipleRequest multipleRequest = (MultipleRequest) request; return buildArrayList(multipleRequest, context); } MultipleSpecimenRelay(MultipleCount multipleCount); @Override Object create(Object request, SpecimenContext context); }
MultipleSpecimenRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof MultipleRequest)) { return new NoSpecimen(); } MultipleRequest multipleRequest = (MultipleRequest) request; return buildArrayList(multipleRequest, context); } MultipleSpecimenRelay(MultipleCount multipleCount); @Override Object create(Object request, SpecimenContext context);  }