DataConventionMasterResource extends AbstractDataResource { @Path("conventions/{conventionId}") public DataConventionResource findConvention(@PathParam("conventionId") String idStr) { ObjectId id = ObjectId.parse(idStr); return new DataConventionResource(this, id); } DataConventionMasterResource(final ConventionMaster conventionMaster); ConventionMaster getConventionMaster(); @GET Response getHateaos(@Context UriInfo uriInfo); @HEAD @Path("conventions") Response status(); @GET @Path("metaData") Response metaData(@Context UriInfo uriInfo); @POST @Path("conventionSearches") Response search(ConventionSearchRequest request); @POST @Path("conventions") Response add(@Context UriInfo uriInfo, ConventionDocument request); @Path("conventions/{conventionId}") DataConventionResource findConvention(@PathParam("conventionId") String idStr); static URI uriMetaData(URI baseUri, ConventionMetaDataRequest request); static URI uriSearch(URI baseUri); static URI uriAdd(URI baseUri);  }
@Test public void testFindConvention() { DataConventionResource test = _resource.findConvention("Test~A"); assertSame(_resource, test.getConventionsResource()); assertEquals(ObjectId.of("Test", "A"), test.getUrlId()); }