### Question:
BooleanSetting extends BaseCyclableSetting<Boolean> { @Override public Boolean cycle(Boolean value) { return !value; } BooleanSetting(String name, boolean def, String key); @Override Boolean cycle(Boolean value);  }### Answer:
@Test public void testCycle() { BooleanSetting setting = new BooleanSetting("test", false, "test"); assertThat(setting.cycle(true), is(false)); assertThat(setting.cycle(false), is(true)); }
@Test public void testConfig() { BooleanSetting setting = new BooleanSetting("test", false, "test"); Configuration config = new Configuration(new DefaultConfiguration()); assertThat(config.getValue(setting), is(false)); config.cycle(setting); assertThat(config.getValue(setting), is(true)); config.cycle(setting); assertThat(config.getValue(setting), is(false)); config.setValue(setting, true); assertThat(config.getValue(setting), is(true)); }