DataHolidayMasterResource extends AbstractDataResource { @Path("holidays/{holidayId}") public DataHolidayResource findHoliday(@PathParam("holidayId") String idStr) { ObjectId id = ObjectId.parse(idStr); return new DataHolidayResource(this, id); } DataHolidayMasterResource(final HolidayMaster holidayMaster); HolidayMaster getHolidayMaster(); @GET Response getHateaos(@Context UriInfo uriInfo); @GET @Path("metaData") Response metaData(@Context UriInfo uriInfo); @POST @Path("holidaySearches") Response search(HolidaySearchRequest request); @POST @Path("holidays") Response add(@Context UriInfo uriInfo, HolidayDocument request); @Path("holidays/{holidayId}") DataHolidayResource findHoliday(@PathParam("holidayId") String idStr); static URI uriMetaData(URI baseUri, HolidayMetaDataRequest request); static URI uriSearch(URI baseUri); static URI uriAdd(URI baseUri);  }
@Test public void testFindHoliday() { DataHolidayResource test = _resource.findHoliday("Test~A"); assertSame(_resource, test.getHolidaysResource()); assertEquals(ObjectId.of("Test", "A"), test.getUrlId()); }