@Test public void testParameters() { System.out.println("Parameters"); HeaderProcessor<EntityE> instance = new HeaderProcessor(EntityE.class); EntityE testClass = new EntityE(); List<String> headerValues = instance.getLinkHeaderValues(testClass, mockUriInfo, mockRmc); assertEquals(1, headerValues.size()); String headerValue = headerValues.get(0); assertTrue(headerValue.contains("</application/resources/E>")); assertTrue(headerValue.contains("; rel=\"relE\"")); assertTrue(headerValue.contains("; rev=\"revE\"")); assertTrue(headerValue.contains("; type=\"type/e\"")); assertTrue(headerValue.contains("; title=\"titleE\"")); assertTrue(headerValue.contains("; anchor=\"anchorE\"")); assertTrue(headerValue.contains("; media=\"mediaE\"")); assertTrue(headerValue.contains("; hreflang=\"en-E\"")); assertTrue(headerValue.contains("; e1=\"v1\"")); assertTrue(headerValue.contains("; e2=\"v2\"")); }
List<String> getLinkHeaderValues(Object entity, UriInfo uriInfo, ResourceMappingContext rmc) { final List<Object> matchedResources = uriInfo.getMatchedResources(); if (!matchedResources.isEmpty()) { final Object resource = matchedResources.get(0); final List<String> headerValues = new ArrayList<>(); for (LinkHeaderDescriptor desc : instanceDescriptor.getLinkHeaders()) { if (ELLinkBuilder.evaluateCondition(desc.getCondition(), entity, resource, entity)) { String headerValue = getLinkHeaderValue(desc, entity, resource, uriInfo, rmc); headerValues.add(headerValue); } } return headerValues; } return Collections.emptyList(); }
HeaderProcessor { List<String> getLinkHeaderValues(Object entity, UriInfo uriInfo, ResourceMappingContext rmc) { final List<Object> matchedResources = uriInfo.getMatchedResources(); if (!matchedResources.isEmpty()) { final Object resource = matchedResources.get(0); final List<String> headerValues = new ArrayList<>(); for (LinkHeaderDescriptor desc : instanceDescriptor.getLinkHeaders()) { if (ELLinkBuilder.evaluateCondition(desc.getCondition(), entity, resource, entity)) { String headerValue = getLinkHeaderValue(desc, entity, resource, uriInfo, rmc); headerValues.add(headerValue); } } return headerValues; } return Collections.emptyList(); } }
HeaderProcessor { List<String> getLinkHeaderValues(Object entity, UriInfo uriInfo, ResourceMappingContext rmc) { final List<Object> matchedResources = uriInfo.getMatchedResources(); if (!matchedResources.isEmpty()) { final Object resource = matchedResources.get(0); final List<String> headerValues = new ArrayList<>(); for (LinkHeaderDescriptor desc : instanceDescriptor.getLinkHeaders()) { if (ELLinkBuilder.evaluateCondition(desc.getCondition(), entity, resource, entity)) { String headerValue = getLinkHeaderValue(desc, entity, resource, uriInfo, rmc); headerValues.add(headerValue); } } return headerValues; } return Collections.emptyList(); } HeaderProcessor(Class<T> c); }
HeaderProcessor { List<String> getLinkHeaderValues(Object entity, UriInfo uriInfo, ResourceMappingContext rmc) { final List<Object> matchedResources = uriInfo.getMatchedResources(); if (!matchedResources.isEmpty()) { final Object resource = matchedResources.get(0); final List<String> headerValues = new ArrayList<>(); for (LinkHeaderDescriptor desc : instanceDescriptor.getLinkHeaders()) { if (ELLinkBuilder.evaluateCondition(desc.getCondition(), entity, resource, entity)) { String headerValue = getLinkHeaderValue(desc, entity, resource, uriInfo, rmc); headerValues.add(headerValue); } } return headerValues; } return Collections.emptyList(); } HeaderProcessor(Class<T> c);  }
HeaderProcessor { List<String> getLinkHeaderValues(Object entity, UriInfo uriInfo, ResourceMappingContext rmc) { final List<Object> matchedResources = uriInfo.getMatchedResources(); if (!matchedResources.isEmpty()) { final Object resource = matchedResources.get(0); final List<String> headerValues = new ArrayList<>(); for (LinkHeaderDescriptor desc : instanceDescriptor.getLinkHeaders()) { if (ELLinkBuilder.evaluateCondition(desc.getCondition(), entity, resource, entity)) { String headerValue = getLinkHeaderValue(desc, entity, resource, uriInfo, rmc); headerValues.add(headerValue); } } return headerValues; } return Collections.emptyList(); } HeaderProcessor(Class<T> c);   }