}
@Override
public void testLotsOfLoanRequests() throws Exception
{
final MuleClient client = muleContext.getClient();
Customer c = new Customer("Ross Mason", 1234);
CustomerQuoteRequest request = new CustomerQuoteRequest(c, 100000, 48);
for (int i = 0; i < getNumberOfRequests(); i++)
{
client.dispatch("CustomerRequests", request, null);
}
MuleMessage result;
for (int i = 0; i < getNumberOfRequests(); i++)
{
result = client.request("CustomerResponses", getDelay());
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() instanceof LoanQuote);
LoanQuote quote = (LoanQuote) result.getPayload();