@Test public void calls_context_with_inner_request_time_n_times() { this.relay.create(new MultipleRequest(String.class), this.mockSpecimenContext); verify(this.mockSpecimenContext, times(this.count.getCount())).resolve(String.class); }
@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);  }