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((policy.getSpecification(PasswordPolicySpec.class)).getMaxLength(), 8);
assertEquals((policy.getSpecification(PasswordPolicySpec.class)).getMinLength(), 6);
}