DataSecurityMasterResource extends AbstractDataResource { @Path("securities/{securityId}") public DataSecurityResource findSecurity(@PathParam("securityId") String idStr) { ObjectId id = ObjectId.parse(idStr); return new DataSecurityResource(this, id); } DataSecurityMasterResource(final SecurityMaster securityMaster); SecurityMaster getSecurityMaster(); @GET Response getHateaos(@Context UriInfo uriInfo); @HEAD @Path("securities") Response status(); @GET @Path("metaData") Response metaData(@Context UriInfo uriInfo); @POST @Path("securitySearches") Response search(SecuritySearchRequest request); @POST @Path("securities") Response add(@Context UriInfo uriInfo, SecurityDocument request); @Path("securities/{securityId}") DataSecurityResource findSecurity(@PathParam("securityId") String idStr); static URI uriMetaData(URI baseUri, SecurityMetaDataRequest request); static URI uriSearch(URI baseUri); static URI uriAdd(URI baseUri);  }
@Test public void testFindSecurity() { DataSecurityResource test = _resource.findSecurity("Test~A"); assertSame(_resource, test.getSecuritiesResource()); assertEquals(ObjectId.of("Test", "A"), test.getUrlId()); }