Setting { public static <T> Setting<T> of(String name, String description, Property<T> property) { return of(name, description, property, null); } private  Setting(String name, String description, Property<T> property, Class<? extends T> type); static Setting<T> of(String name, String description, Property<T> property); static Setting<T> of(String name, String description, Property<T> property, Class<? extends T> type); static Setting<T> of(String name, Property<T> property); static Setting<T> of(String name, Property<T> property, Class<? extends T> type); void setValue(T value); ReadOnlyProperty<T> getProperty(); String getName(); String getDescription(); Class<? extends T> getType();  }
@Test public void testInvalidNames() { assertAll( () -> assertThrows(NullPointerException.class, () -> Setting.of(null, property)), () -> assertThrows(IllegalArgumentException.class, () -> Setting.of("", property)), () -> assertThrows(IllegalArgumentException.class, () -> Setting.of(" ", property)), () -> assertThrows(IllegalArgumentException.class, () -> Setting.of("\n", property)), () -> assertThrows(IllegalArgumentException.class, () -> Setting.of("\t", property)) ); }
@Test public void testNullProperty() { assertThrows(NullPointerException.class, () -> Setting.of("Name", null)); }