public void testLoanBrokerMuleClient() throws Exception
{
muleContext.getRegistry().registerObject("streamToObjectTransformer", new ByteArrayToObject());
MuleClient client = new MuleClient(muleContext);
Customer c = new Customer("Ross Mason", 1234);
CustomerQuoteRequest request = new CustomerQuoteRequest(c, 100000, 48);
MuleMessage result = client.send("http://localhost:11080?responseTransformers=streamToObjectTransformer", request, null);
assertNotNull("Result is null", result);
assertFalse("Result is null", result.getPayload() instanceof NullPayload);
assertTrue("Result should be LoanQuote but is " + result.getPayload().getClass().getName(),
result.getPayload(Object.class) instanceof LoanQuote);