@Test
void toJSONWithEmptyOptional() {

    Optional<TestBean> optional = Optional.empty();
    byte[] bytes = writer.toJSON(optional);
    assertThat(new String(bytes, StandardCharsets.UTF_8)).isEqualTo("null");
}