JerseyResourceLinkGenerator extends ResourceLinkGenerator { @Override protected boolean isCandidateForAnalysis(final Method method) { for (final Annotation annotation : method.getDeclaredAnnotations()) { if (HttpMethods.isHttpMethod(annotation)) { return true; } } return false; } JerseyResourceLinkGenerator(final URI applicationBaseUri,
                                       final URI relationTypeBaseUri,
                                       final URI varTypeBaseUri,
                                       final String docRootDir);   }
@Test public void shouldBeTemplateLink() throws Exception { final JerseyResourceLinkGenerator generator = new JerseyResourceLinkGenerator( create("http: create("http: null, null ); final Method method = ResourceWithTemplateLinkWithExtension.class.getMethod("getSomething"); final boolean isCandidateForAnalysis = generator.isCandidateForAnalysis(method); final ResourceLink resourceLink = generator.resourceLinkFor(method); assertTrue(isCandidateForAnalysis); assertFalse(resourceLink.isDirectLink()); }