DataLegalEntityMasterResource extends AbstractDataResource { @Path("legalentities/{legalEntityId}") public com.opengamma.master.legalentity.impl.DataLegalEntityResource findLegalEntity(@PathParam("legalEntityId") String idStr) { ObjectId id = ObjectId.parse(idStr); return new DataLegalEntityResource(this, id); } DataLegalEntityMasterResource(final LegalEntityMaster legalEntityMaster); LegalEntityMaster getLegalEntityMaster(); @GET Response getHateaos(@Context UriInfo uriInfo); @HEAD @Path("legalentities") Response status(); @GET @Path("metaData") Response metaData(@Context UriInfo uriInfo); @POST @Path("legalentitiesearches") Response search(LegalEntitySearchRequest request); @POST @Path("legalentities") Response add(@Context UriInfo uriInfo, LegalEntityDocument request); @Path("legalentities/{legalEntityId}") com.opengamma.master.legalentity.impl.DataLegalEntityResource findLegalEntity(@PathParam("legalEntityId") String idStr); static URI uriMetaData(URI baseUri, LegalEntityMetaDataRequest request); static URI uriSearch(URI baseUri); static URI uriAdd(URI baseUri);  }
@Test public void testFindLegalEntity() { DataLegalEntityResource test = _resource.findLegalEntity("Test~A"); assertSame(_resource, test.getLegalEntitiesResource()); assertEquals(ObjectId.of("Test", "A"), test.getUrlId()); }