testVM("vm://default-attributes");
}
protected void testVM(String endpoint) throws Exception
{
DefaultLocalMuleClient client = new DefaultLocalMuleClient(muleContext);
HashMap<String, Object> props = new HashMap<String,Object>();
props.put("username", "ross");
props.put("password", "ross");
MuleMessage result = client.send(endpoint, "hi", props);
assertNull(result.getExceptionPayload());
props.put("password", "badpass");
MuleMessage result2 = client.send(endpoint, "hi", props);
assertNotNull(result2);
assertNotNull(result2.getExceptionPayload());
assertEquals(UnauthorisedException.class, result2.getExceptionPayload().getException().getClass());
}