SecurityContextHolder.setContext(new SecurityContextImpl());
}
public void testCaseGoodAuthenticationGoodAuthorisation() throws Exception
{
MuleClient client = new MuleClient(muleContext);
Map props = new HashMap();
EncryptionStrategy strategy = muleContext
.getSecurityManager()
.getEncryptionStrategy("PBE");
String header = MuleCredentials.createHeader("marie", "marie", "PBE", strategy);
props.put(MuleProperties.MULE_USER_PROPERTY, header);
MuleMessage m = client.send("vm://test", "Marie", props);
assertNotNull(m);
assertTrue(m.getPayload().equals("Marie"));
}