@JsonCreator
    public static MessageCountRotationStrategyConfig create(@JsonProperty(TYPE_FIELD) String type,
                                                            @JsonProperty("max_docs_per_index") @Min(1) int maxDocsPerIndex) {
        return new AutoValue_MessageCountRotationStrategyConfig(type, maxDocsPerIndex);
    }
@Test
    public void testSerialization() throws JsonProcessingException {
        final RotationStrategyConfig config = MessageCountRotationStrategyConfig.create(1000);
        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.rotation.strategies.MessageCountRotationStrategyConfig");
        assertThat((Integer) JsonPath.read(document, "$.max_docs_per_index")).isEqualTo(1000);
    }