@Test
void validateList() {

    List<TestBean> list = Lists.newArrayList();
    assertThatThrownBy(() -> writer.toJSON(list))
            .isInstanceOf(Error.class)
            .hasMessageContaining("bean class must not be java built-in class");
}