@Test(expected = IllegalStateException.class) public void noPasswordExpirationInMonth() { PasswordPolicy.builder() .maximumLength(0) .minimumDigit(0) .minimumLength(0) .minimumLowerCaseCharacter(0) .minimumSpecialCharacter(0) .minimumUpperCaseCharacter(0) .build(); }
@Test public void valid() { PasswordPolicy.builder() .maximumLength(0) .minimumDigit(0) .minimumLength(0) .minimumLowerCaseCharacter(0) .minimumSpecialCharacter(0) .minimumUpperCaseCharacter(0) .passwordExpirationInMonth(0) .build(); }