@Test
void registerDuplicateBean() {

    assertThatThrownBy(() -> Bean.register(TestBean.class))
            .isInstanceOf(Error.class)
            .hasMessageContaining("bean class is already registered");
}