### Question:
CipherProperties extends AbstractProperties { @PostConstruct public void validatePropertyValues() throws SakuliInitException { final List<String> acceptedValsEnMode = Arrays.asList(ENCRYPTION_MODE_ENVIRONMENT, ENCRYPTION_MODE_INTERFACE); if (!acceptedValsEnMode.contains(encryptionMode)) { throw new SakuliInitException(String.format("Value of property '%s=%s' is not valid! Accepted values are: %s", ENCRYPTION_MODE, encryptionMode, acceptedValsEnMode)); } }  static CipherProperties load(Properties props); @PostConstruct void validatePropertyValues(); String getEncryptionInterface(); void setEncryptionInterface(String encryptionInterface); boolean isEncryptionInterfaceAutodetect(); void setEncryptionInterfaceAutodetect(boolean encryptionInterfaceAutodetect); boolean isEncryptionModeInterface(); boolean isEncryptionModeEnv(); String getEncryptionMode(); void setEncryptionMode(String encryptionMode); String getEncryptionKey(); void setEncryptionKey(String encryptionKey); static final String ENCRYPTION_MODE; static final String ENCRYPTION_KEY; static final String ENCRYPTION_KEY_ENV; static final String ENCRYPTION_INTERFACE; static final String ENCRYPTION_INTERFACE_AUTODETECT; static final String ENCRYPTION_MODE_ENVIRONMENT; static final String ENCRYPTION_MODE_INTERFACE; }### Answer:
@Test(expectedExceptions = SakuliInitException.class, expectedExceptionsMessageRegExp = "Value of property 'sakuli.encryption.mode=not-valid-mode' is not valid! Accepted values are: \\[environment, interface\\]") public void testValidatePropertyValues() throws Exception { Properties props = new Properties(); props.setProperty(CipherProperties.ENCRYPTION_MODE,"not-valid-mode"); CipherProperties.load(props).validatePropertyValues(); }