@Test
 public void testFlowRefHandlingException() throws Exception {
   LocalMuleClient client = muleContext.getClient();
   MuleMessage response =
       client.send("vm://inEnricherExceptionFlow", new DefaultMuleMessage("payload", muleContext));
   assertThat(ErrorProcessor.handled, not(nullValue()));
   assertThat(response.getExceptionPayload(), nullValue());
 }
  @Test
  public void mapsToHelloWorldException() throws Exception {
    LocalMuleClient client = muleContext.getClient();

    MuleMessage result =
        client.send(
            "http://localhost:" + port.getNumber() + "/helloworld/throwException",
            getTestMuleMessage(),
            getHttpOptions());

    assertEquals(
        (Integer) HttpConstants.SC_SERVICE_UNAVAILABLE,
        result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0));
  }