@Test public void testCollection() { LOG.info("Collection"); FieldProcessor<List> instance = new FieldProcessor(List.class); TestClassE item1 = new TestClassE("10"); TestClassE item2 = new TestClassE("20"); List<TestClassE> list = Arrays.asList(item1, item2); instance.processLinks(list, mockUriInfo, mockRmc, mockRlcc); assertEquals("widgets/10", list.get(0).link); assertEquals("widgets/20", list.get(1).link); }
void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c); }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c);  }
FieldProcessor { void processLinks(T entity, UriInfo uriInfo, ResourceMappingContext rmc, ResourceLinkContributionContext rlcc) { Set<Object> processed = new HashSet<Object>(); Object resource = uriInfo.getMatchedResources().get(0); processLinks(entity, resource, entity, processed, uriInfo, rmc, rlcc); } FieldProcessor(Class<T> c);   }