@Test
public void testObjectAttr() {

  class Foo extends AttrComposite {}
  @SuppressWarnings("unused")
  class Clazz extends AttrComposite {
    AttrObject<Foo> attr =
        attributes.register("attr", AttrObject.builder(Foo.class).defaultValue(Foo::new));
    AttrObject<Foo> attrNull =
        attributes.register("attrNull", AttrObject.builder(Foo.class).defaultValue(() -> null));
  }
  ClassInfoCollector collector = new ClassInfoCollector(JvmNameMapper.INSTANCE);
  ClassInfo classInfo = collector.collect(new Clazz());
  Assertions.assertThat(classInfo.attributes)
      .hasEntrySatisfying(
          "attr",
          info ->
              Assertions.assertThat(info.value)
                  .isEqualTo(JvmNameMapper.INSTANCE.toName(new Foo())))
      .hasEntrySatisfying("attrNull", info -> Assertions.assertThat(info.value).isNull());
}