use of org.graylog2.plugin.indexer.rotation.RotationStrategyConfig in project graylog2-server by Graylog2.
the class SizeBasedRotationStrategyConfigTest method testDeserialization.
@Test
public void testDeserialization() throws IOException {
final ObjectMapper objectMapper = new ObjectMapperProvider().get();
final String json = "{ \"type\": \"org.graylog2.indexer.rotation.strategies.SizeBasedRotationStrategyConfig\", \"max_size\": 1000 }";
final RotationStrategyConfig config = objectMapper.readValue(json, RotationStrategyConfig.class);
assertThat(config).isInstanceOf(SizeBasedRotationStrategyConfig.class);
assertThat(((SizeBasedRotationStrategyConfig) config).maxSize()).isEqualTo(1000);
}
Aggregations