@Test public void range_annotation_returns_range_request() throws NoSuchFieldException { Range rangeAnnotation = getRangeAnnotation(); RangeRequest enrichedRequest = (RangeRequest)this.enricher.enrich(this.originalRequest, rangeAnnotation); assertSame(this.originalRequest, enrichedRequest.getRequest()); assertEquals(10L, enrichedRequest.getMin()); assertEquals(100L, enrichedRequest.getMax()); }
public Object enrich(Object request, Annotation annotation) { if(!(annotation instanceof Range)) { return null; } Range rangeAnnotation = (Range)annotation; return new RangeRequest<Long>(request, rangeAnnotation.min(), rangeAnnotation.max()); }
RangeRequestEnricher implements RequestEnricher { public Object enrich(Object request, Annotation annotation) { if(!(annotation instanceof Range)) { return null; } Range rangeAnnotation = (Range)annotation; return new RangeRequest<Long>(request, rangeAnnotation.min(), rangeAnnotation.max()); } }
RangeRequestEnricher implements RequestEnricher { public Object enrich(Object request, Annotation annotation) { if(!(annotation instanceof Range)) { return null; } Range rangeAnnotation = (Range)annotation; return new RangeRequest<Long>(request, rangeAnnotation.min(), rangeAnnotation.max()); }  }
RangeRequestEnricher implements RequestEnricher { public Object enrich(Object request, Annotation annotation) { if(!(annotation instanceof Range)) { return null; } Range rangeAnnotation = (Range)annotation; return new RangeRequest<Long>(request, rangeAnnotation.min(), rangeAnnotation.max()); }  Object enrich(Object request, Annotation annotation); }
RangeRequestEnricher implements RequestEnricher { public Object enrich(Object request, Annotation annotation) { if(!(annotation instanceof Range)) { return null; } Range rangeAnnotation = (Range)annotation; return new RangeRequest<Long>(request, rangeAnnotation.min(), rangeAnnotation.max()); }  Object enrich(Object request, Annotation annotation);  }