protected DurationSerializer() {
        super(Duration.class);
    }
@Test
    void testDurationSerializer() throws IOException {
        Duration duration = Duration.ofNanos(323567890098765L);
        JsonGenerator jsonGenerator = mock(JsonGenerator.class);

        durationSerializer.serialize(duration, jsonGenerator, null);

        ArgumentCaptor<String> argumentCaptor = ArgumentCaptor.forClass(String.class);
        verify(jsonGenerator).writeNumber(argumentCaptor.capture());

        String captorValue = argumentCaptor.getValue();
        assertThat(captorValue).isEqualTo("323567.890098765");
    }