@Test
public void should_serialize_object_into_human_readable_json_using_serialization_view() throws Exception {

    SimpleObject object = new SimpleObject("id", "Vincent", 1);
    assertThat(new String(objectMapper.toPrettyJson(object, JsonViewPersistence.class))).isEqualTo("{" + System.lineSeparator() +
            "  \"name\" : \"Vincent\"," + System.lineSeparator() +
            "  \"number\" : 1" + System.lineSeparator() +
            "}");
}