// get the test bean and validate all mock managers have been injected.
TestBean testBean = (TestBean) super.getBean("TestBean");
assertNotNull("TestBean could not be found", testBean);
// check the authentication manager injection.
AuthenticationManager authenticationManager = testBean.getAuthenticationManager();
assertNotNull("Invalid null AuthenticationManager found", authenticationManager);
assertEquals("Invalid AuthenticationManager implementation found", MockAuthenticationManager.class,
authenticationManager.getClass());
assertEquals("TestPolicy1", authenticationManager.getSecurityDomain());
// check the authorization manager injection.
AuthorizationManager authorizationManager = testBean.getAuthorizationManager();
assertNotNull("Invalid null AuthorizationManager found", authorizationManager);
assertEquals("Invalid AuthorizationManager implementation found", MockAuthorizationManager.class,