systemManager.setAnySystemSettings(origSettings, false, true);
}
}
public void testPasswordFieldsObfuscation() {
SystemSettings masked = systemManager.getSystemSettings(overlord);
SystemSettings unmasked = systemManager.getUnmaskedSystemSettings(true);
SystemSettings obfuscated = systemManager.getObfuscatedSystemSettings(true);
for (SystemSetting setting : SystemSetting.values()) {
if (setting.getType() == PropertySimpleType.PASSWORD) {
if (masked.containsKey(setting) && masked.get(setting) != null) {
assertEquals("Unexpected unmasked value", PropertySimple.MASKED_VALUE, masked.get(setting));
assertEquals("Unmasked and obfuscated values don't correspond", obfuscated.get(setting),
PicketBoxObfuscator.encode(unmasked.get(setting)));
}
}
}