GeoServerSecurityManager secMgr = createNiceMock(GeoServerSecurityManager.class);
expect(secMgr.listUserGroupServices()).andReturn(
new TreeSet<String>(Arrays.asList("default", "jdbc"))).anyTimes();
GeoServerPlainTextPasswordEncoder pwEncoder = getPlainTextPasswordEncoder();
expect(secMgr.loadPasswordEncoder(pwEncoder.getName())).andReturn(pwEncoder).anyTimes();
expect(secMgr.listPasswordValidators()).andReturn(
new TreeSet<String>(Arrays.asList(PasswordValidator.DEFAULT_NAME))).anyTimes();
replay(secMgr);
validator = new JdbcSecurityConfigValidator(secMgr);