Source:
<code>public void testSerde() throws IOException { final ObjectMapper mapper = setupInjectablesInObjectMapper(new DefaultObjectMapper()); final ClientCompactQuery query = new ClientCompactQuery( "datasource", new ClientCompactionIOConfig( new ClientCompactionIntervalSpec( Intervals.of("2019/2020"), <START> "testSha256OfSoredSegmentIds" <END> ) ), null, new ClientCompactQueryTuningConfig( 100, 40000, 2000L, 30000L, new IndexSpec( new DefaultBitmapSerdeFactory(), CompressionStrategy.LZ4, CompressionStrategy.LZF, LongEncodingStrategy.LONGS ), null, 1000L ), new HashMap<>() ); final byte[] json = mapper.writeValueAsBytes(query); final CompactionTask task = (CompactionTask) mapper.readValue(json, Task.class); Assert.assertEquals(query.getDataSource(), task.getDataSource()); Assert.assertTrue(task.getIoConfig().getInputSpec() instanceof CompactionIntervalSpec); Assert.assertEquals( query.getIoConfig().getInputSpec().getInterval(), ((CompactionIntervalSpec) task.getIoConfig().getInputSpec()).getInterval() ); Assert.assertEquals( query.getIoConfig().getInputSpec().getSha256OfSortedSegmentIds(), ((CompactionIntervalSpec) task.getIoConfig().getInputSpec()).getSha256OfSortedSegmentIds() ); Assert.assertEquals(query.getTargetCompactionSizeBytes(), task.getTargetCompactionSizeBytes()); Assert.assertEquals( query.getTuningConfig().getMaxRowsInMemory().intValue(), task.getTuningConfig().getMaxRowsInMemory() ); Assert.assertEquals( query.getTuningConfig().getMaxBytesInMemory().longValue(), task.getTuningConfig().getMaxBytesInMemory() ); Assert.assertEquals( query.getTuningConfig().getMaxRowsPerSegment(), task.getTuningConfig().getMaxRowsPerSegment() ); Assert.assertEquals( query.getTuningConfig().getMaxTotalRows(), task.getTuningConfig().getMaxTotalRows() ); Assert.assertEquals( query.getTuningConfig().getIndexSpec(), task.getTuningConfig().getIndexSpec() ); Assert.assertEquals( query.getTuningConfig().getPushTimeout().longValue(), task.getTuningConfig().getPushTimeout() ); Assert.assertEquals(query.getContext(), task.getContext()); }</code><technical_language>typo: Sored -> Stored</technical_language>

Target:
public void testSerde() throws IOException { final ObjectMapper mapper = setupInjectablesInObjectMapper(new DefaultObjectMapper()); final ClientCompactQuery query = new ClientCompactQuery( "datasource", new ClientCompactionIOConfig( new ClientCompactionIntervalSpec( Intervals.of("2019/2020"), "testSha256OfSortedSegmentIds" ) ), null, new ClientCompactQueryTuningConfig( 100, 40000, 2000L, 30000L, new IndexSpec( new DefaultBitmapSerdeFactory(), CompressionStrategy.LZ4, CompressionStrategy.LZF, LongEncodingStrategy.LONGS ), null, 1000L ), new HashMap<>() ); final byte[] json = mapper.writeValueAsBytes(query); final CompactionTask task = (CompactionTask) mapper.readValue(json, Task.class); Assert.assertEquals(query.getDataSource(), task.getDataSource()); Assert.assertTrue(task.getIoConfig().getInputSpec() instanceof CompactionIntervalSpec); Assert.assertEquals( query.getIoConfig().getInputSpec().getInterval(), ((CompactionIntervalSpec) task.getIoConfig().getInputSpec()).getInterval() ); Assert.assertEquals( query.getIoConfig().getInputSpec().getSha256OfSortedSegmentIds(), ((CompactionIntervalSpec) task.getIoConfig().getInputSpec()).getSha256OfSortedSegmentIds() ); Assert.assertEquals(query.getTargetCompactionSizeBytes(), task.getTargetCompactionSizeBytes()); Assert.assertEquals( query.getTuningConfig().getMaxRowsInMemory().intValue(), task.getTuningConfig().getMaxRowsInMemory() ); Assert.assertEquals( query.getTuningConfig().getMaxBytesInMemory().longValue(), task.getTuningConfig().getMaxBytesInMemory() ); Assert.assertEquals( query.getTuningConfig().getMaxRowsPerSegment(), task.getTuningConfig().getMaxRowsPerSegment() ); Assert.assertEquals( query.getTuningConfig().getMaxTotalRows(), task.getTuningConfig().getMaxTotalRows() ); Assert.assertEquals( query.getTuningConfig().getIndexSpec(), task.getTuningConfig().getIndexSpec() ); Assert.assertEquals( query.getTuningConfig().getPushTimeout().longValue(), task.getTuningConfig().getPushTimeout() ); Assert.assertEquals(query.getContext(), task.getContext()); }