@Test public void returns_a_number_in_the_specified_range() { RangeRequest request = new RangeRequest<Long>(SpecimenType.of(Long.class), 200L, 300L); Long result = (Long)this.numericRangeRelay.create(request, this.mockContext); assertTrue(result >= 200 && result < 300); }
@Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof RangeRequest)) { return new NoSpecimen(); } RangeRequest rangeRequest = (RangeRequest) request; if (!requestIsAMatch(rangeRequest)) { return new NoSpecimen(); } return create(rangeRequest, context); }
NumericRangeRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof RangeRequest)) { return new NoSpecimen(); } RangeRequest rangeRequest = (RangeRequest) request; if (!requestIsAMatch(rangeRequest)) { return new NoSpecimen(); } return create(rangeRequest, context); } }
NumericRangeRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof RangeRequest)) { return new NoSpecimen(); } RangeRequest rangeRequest = (RangeRequest) request; if (!requestIsAMatch(rangeRequest)) { return new NoSpecimen(); } return create(rangeRequest, context); }  }
NumericRangeRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof RangeRequest)) { return new NoSpecimen(); } RangeRequest rangeRequest = (RangeRequest) request; if (!requestIsAMatch(rangeRequest)) { return new NoSpecimen(); } return create(rangeRequest, context); }  @Override Object create(Object request, SpecimenContext context); }
NumericRangeRelay implements SpecimenBuilder { @Override public Object create(Object request, SpecimenContext context) { if (!(request instanceof RangeRequest)) { return new NoSpecimen(); } RangeRequest rangeRequest = (RangeRequest) request; if (!requestIsAMatch(rangeRequest)) { return new NoSpecimen(); } return create(rangeRequest, context); }  @Override Object create(Object request, SpecimenContext context);  }