@Test
public void testExec() throws Exception {

    final ServiceContext context = createServiceContext();
    loginAsAdmin(context);
    assertEquals("true", _settingsRepository.findOne(Settings.SYSTEM_CSW_ENABLE).getValue());
    assertEquals("-1", _settingsRepository.findOne(Settings.SYSTEM_CSW_CAPABILITY_RECORD_UUID).getValue());
    final Element params = createParams(read("csw.enable", "off"),
        read("csw.capabilityRecordId", "2"));
    final Element results = new Set().exec(params, context);
    assertEquals("ok", results.getText());
    assertEquals("false", _settingsRepository.findOne(Settings.SYSTEM_CSW_ENABLE).getValue());
    assertEquals("2", _settingsRepository.findOne(Settings.SYSTEM_CSW_CAPABILITY_RECORD_UUID).getValue());
}