@Test
public void testEnumAttr() {

  @SuppressWarnings("unused")
  class Clazz extends AttrComposite {
    AttrEnum<DayOfWeek> attrEnum =
        attributes.register(
            "attrEnum", AttrEnum.builder(DayOfWeek.class).defaultValue(DayOfWeek.FRIDAY));
    AttrEnum<DayOfWeek> attrEnumNull =
        attributes.register("attrEnumNull", AttrEnum.builder(DayOfWeek.class).defaultValue(null));
  }
  ClassInfoCollector collector = new ClassInfoCollector(JvmNameMapper.INSTANCE);
  ClassInfo classInfo = collector.collect(new Clazz());
  Assertions.assertThat(classInfo.attributes)
      .hasEntrySatisfying(
          "attrEnum",
          info -> Assertions.assertThat(info.value).isEqualTo(DayOfWeek.FRIDAY.toString()))
      .hasEntrySatisfying("attrEnumNull", info -> Assertions.assertThat(info.value).isNull());
}