BooleanPropertyProvider implements PropertyProvider<Boolean> { @Override public String toString() { return value.toString(); } BooleanPropertyProvider(PropertyKey<Boolean> key); @Override Boolean get(); @Override Boolean set(Boolean value); @Override String toString(); final AtomicBoolean value; }
@Test public void testToString() { final PropertyKey<Boolean> key = PropertyKey.builder("testToString", Boolean.class).defaultValue(true).build(); final BooleanPropertyProvider provider = new BooleanPropertyProvider(key); assertEquals("true", provider.toString()); provider.set(false); assertEquals("false", provider.toString()); }