public void update() {
PasswordPolicySpec specification = new PasswordPolicySpec();
specification.setMaxLength(8);
specification.setMinLength(6);
Policy policy = policyDAO.getGlobalPasswordPolicy();
assertNotNull(policy);
policy.setSpecification(specification);
policy = policyDAO.save(policy);
assertNotNull(policy);
assertEquals(PolicyType.GLOBAL_PASSWORD, policy.getType());
assertEquals(((PasswordPolicySpec) policy.getSpecification()).getMaxLength(), 8);
assertEquals(((PasswordPolicySpec) policy.getSpecification()).getMinLength(), 6);
}