DataPortfolioNodeResource extends AbstractDataResource { @GET public Response get() { ManageablePortfolioNode result = getPortfolioMaster().getNode(_urlResourceId); return responseOkObject(result); } DataPortfolioNodeResource(final DataPortfolioMasterResource portfoliosResource, final UniqueId nodeId); DataPortfolioMasterResource getPortfoliosResource(); UniqueId getUrlNodeId(); PortfolioMaster getPortfolioMaster(); @GET Response get(); static URI uri(URI baseUri, UniqueId nodeId);  }
@Test public void testGetPortfolio() { final ManageablePortfolioNode target = new ManageablePortfolioNode("Node"); when(_underlying.getNode(UID)).thenReturn(target); Response test = _resource.get(); assertEquals(Status.OK.getStatusCode(), test.getStatus()); assertSame(target, test.getEntity()); }