PlannerResource implements Resource { @POST @Timed @Produces("application/x-yaml") @Path("dam") @ApiOperation("Get SeaClouds-compliant TOSCA DAM from an ADP document") public Response getDam(@ApiParam() String adp) { if (adp == null) { LOG.error("Missing input parameters"); return Response.status(Response.Status.NOT_ACCEPTABLE).build(); } else { return Response.ok(planner.getDam(adp)).build(); } } PlannerResource(PlannerProxy planner); @POST @Timed @Produces("application/x-yaml") @Path("adps") @ApiOperation("Get SeaClouds-compliant ADP list from an AAM document") Response getAdps(@ApiParam() String aam); @POST @Timed @Produces("application/x-yaml") @Path("dam") @ApiOperation("Get SeaClouds-compliant TOSCA DAM from an ADP document") Response getDam(@ApiParam() String adp);  }
@Test public void testGetDam() throws Exception { String entity = (String) resource.getDam(getAdp()).getEntity(); SeaCloudsApplicationData newApp = new SeaCloudsApplicationData(entity); assertEquals(newApp.getToscaDam(), applicationData.getToscaDam()); }