@Test public void shouldReturnObjectWriterWithPrettyPrintingEnabled() { final Map<String, String> objectToSerialize = new HashMap<>(); objectToSerialize.put("field1", "value1"); objectToSerialize.put("field2", "value2"); String actual; try { actual = getDefaultJsonObjectWriter().writeValueAsString(objectToSerialize); } catch (JsonProcessingException e) { fail(e.getMessage()); actual = ""; } assertThat(actual) .withFailMessage("Should be pretty printed and therefore contain line breaks") .contains(System.lineSeparator()); }
public static ObjectWriter getDefaultJsonObjectWriter() { return DEFAULT_JSON_OBJECT_WRITER; }
ObjectWriterFactory { public static ObjectWriter getDefaultJsonObjectWriter() { return DEFAULT_JSON_OBJECT_WRITER; } }
ObjectWriterFactory { public static ObjectWriter getDefaultJsonObjectWriter() { return DEFAULT_JSON_OBJECT_WRITER; }  }
ObjectWriterFactory { public static ObjectWriter getDefaultJsonObjectWriter() { return DEFAULT_JSON_OBJECT_WRITER; }  static ObjectWriter getDefaultJsonObjectWriter(); }
ObjectWriterFactory { public static ObjectWriter getDefaultJsonObjectWriter() { return DEFAULT_JSON_OBJECT_WRITER; }  static ObjectWriter getDefaultJsonObjectWriter();  }