@Test
void withUnregisteredBean() {

    assertThatThrownBy(() -> reader.fromJSON(TestUnregisteredBean.class, new byte[0]))
            .isInstanceOf(Error.class)
            .hasMessageContaining("bean class is not registered");
}