@Test public void shouldReturnObjectWriterThatWritesDurationAsISO8601() { final Duration objectToSerialize = Duration.ofSeconds(30); String actual; try { actual = getDefaultJsonObjectWriter().writeValueAsString(objectToSerialize); } catch (JsonProcessingException e) { fail(e.getMessage()); actual = ""; } assertThat(actual) .describedAs("Serialized form of Duration") .isEqualTo("\"" + Duration.ofSeconds(30).toString() + "\""); }
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();  }