public class SystemSettingsValidatorTest extends JMockTest {
public void testValidatorCallsSystemManager() {
final SystemManagerLocal systemManager = context.mock(SystemManagerLocal.class);
SystemSettingsValidator validator = new SystemSettingsValidator(systemManager);
final Properties settings = new Properties();
settings.put("A", "a");
settings.put("B", "b");
SystemSettings importedSettings = new SystemSettings(settings);
context.checking(new Expectations() {
{
oneOf(systemManager).validateSystemConfiguration(with(any(Subject.class)), with(settings));
}
});
validator.validateExportedEntity(importedSettings);
}