### Question:
SituationExchangeResource { @POST @Produces("application/xml") @Consumes("application/xml") public Response handlePost(String body) throws Exception { return handleRequest(body); } SituationExchangeResource(); @GET Response handleGet(); @POST @Produces("application/xml") @Consumes("application/xml") Response handlePost(String body); Response handleRequest(String body); NycSiriService getNycSiriService(); void setNycSiriService(NycSiriService _siriService); void setEnvironment(NycEnvironment environment);  }### Answer:
@Test public void testServiceAndSubscriptionRequest() throws Exception { setupServiceAlerts(); String body = loadSample("service-and-subscription-requests.xml"); Response response = handlePost(body); Siri responseSiri = verifySiriResponse(response); verifySituationExchangeDelivery(responseSiri); verifySubscriptionRequest(responseSiri); }
@Test public void testServiceAndSubscriptionRequestMissingRequiredElement() throws Exception { setupServiceAlerts(); String body = loadSample("service-and-subscription-requests-missing.xml"); Response response = handlePost(body); Siri responseSiri = verifySiriResponse(response); verifySituationExchangeDelivery(responseSiri); verifySubscriptionRequest(responseSiri, EXPECT_FAILURE); }
@Test public void testServiceRequest() throws Exception { setupServiceAlerts(); String body = loadSample("service-request.xml"); Response response = handlePost(body); Siri responseSiri = verifySiriResponse(response); verifySituationExchangeDelivery(responseSiri); }