RootResource implements RootApi { protected Link resourceLink(Object resource, String rel) { if (resource instanceof Method) { return methodLink(rel, (Method) resource); } return classLink(rel, (Class) resource); } @Inject  RootResource(Configuration config); @SecurityHole(noAuth = true, anon = true) List<Link> getRootResources(); static final Map<Object, String> RESOURCE_CLASSES; }
@Test public void getResourceEntry() { Link result = rootResource.resourceLink(FooResource.class, null); assertEquals("foo", result.getRel()); assertEquals("/foo", result.getHref()); }