private SecurityContext createTestAuthentication() {
   Authentication auth =
       new DefaultMuleAuthentication(new MuleCredentials("dan", new char[] {'d', 'f'}));
   auth.setProperties(Collections.<String, Object>singletonMap("key1", "value1"));
   SecurityContext securityContext = new DefaultSecurityContextFactory().create(auth);
   return securityContext;
 }