EnforcementJobRest extends AbstractSLARest { @GET @Path("{agreementId}") @Produces(MediaType.APPLICATION_XML) public Response getEnforcementJobByAgreementId(@PathParam("agreementId") String agreementId){ logger.debug("StartOf getEnforcementJobByAgreementId - REQUEST for /enforcementJobs/" + agreementId); try { EnforcementJobHelper enforcementJobService = getHelper(); String serializedEnforcement = enforcementJobService.getEnforcementJobByUUID(agreementId); if (serializedEnforcement!=null){ logger.debug("EndOf getEnforcementJobByAgreementId"); return buildResponse(200, serializedEnforcement); }else{ logger.debug("EndOf getEnforcementJobByAgreementId"); return buildResponse(404, printError(404, "There is no enforcement with uuid " + agreementId + " in the SLA Repository Database")); } } catch (HelperException e) { logger.info("getEnforcementJobByAgreementId exception:"+e.getMessage()); return buildResponse(e); } } EnforcementJobRest(); @GET @Produces(MediaType.APPLICATION_XML) Response getEnforcements(); @GET @Path("{agreementId}") @Produces(MediaType.APPLICATION_XML) Response getEnforcementJobByAgreementId(@PathParam("agreementId") String agreementId); @PUT @Path("{agreementId}/start") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response startEnforcementJob(@PathParam("agreementId") String agreementId); @PUT @Path("{agreementId}/stop") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response stopEnforcementJob(
            @PathParam("agreementId") String agreementId); @POST @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response createEnforcementJob(@Context HttpHeaders hh, String payload);  }
@Test public void testGetEnforcementJobByAgreementId() throws IOException, JAXBException { assert (true); }