@Test public void non_range_annotation_returns_null() throws NoSuchMethodException { Before beforeAnnotation = getBeforeAnnotation(); Object enrichedRequest = this.enricher.enrich(this.originalRequest, beforeAnnotation); assertNull(enrichedRequest); }
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);  }