@Test
public void testConstraintValidation() {

  AttrDouble attr = AttrDouble.builder().min(10).max(20).defaultValue(null);
  attr.set(10d);
  attr.set(20d);
  Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
      .isThrownBy(() -> attr.set(9d));
  Assertions.assertThatExceptionOfType(IllegalArgumentException.class)
      .isThrownBy(() -> attr.set(21d));
}