@JsonCreator
    public static ClosingRetentionStrategyConfig create(@JsonProperty(TYPE_FIELD) String type,
                                                        @JsonProperty("max_number_of_indices") @Min(1) int maxNumberOfIndices) {
        return new AutoValue_ClosingRetentionStrategyConfig(type, maxNumberOfIndices);
    }
@Test
    public void testSerialization() throws JsonProcessingException {
        final ClosingRetentionStrategyConfig config = ClosingRetentionStrategyConfig.create(20);
        final ObjectMapper objectMapper = new ObjectMapperProvider().get();
        final String json = objectMapper.writeValueAsString(config);

        final Object document = Configuration.defaultConfiguration().jsonProvider().parse(json);
        assertThat((String) JsonPath.read(document, "$.type")).isEqualTo("org.graylog2.indexer.retention.strategies.ClosingRetentionStrategyConfig");
        assertThat((Integer) JsonPath.read(document, "$.max_number_of_indices")).isEqualTo(20);
    }