@Test
void toJSONWithOptional() {

    var bean = new TestBean();
    bean.intField = 5;
    Optional<TestBean> optional = Optional.of(bean);
    byte[] bytes = writer.toJSON(optional);
    assertThat(bytes).isNotEmpty();
}