@Test
public void testConstraintValidation() {

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