new BatchBuildInfo(10L, null, ImmutableMap.of("job-id-1", "url-1"), new String[]{"arg1", "arg2"}))
.lastBatchBuildInfo(
new BatchBuildInfo(11L, false, ImmutableMap.of("job-id-2", "url-2"), new String[]{"arg3"}))
.occVersion(5).build();
IndexerDefinitionJsonSerDeser serdeser = new IndexerDefinitionJsonSerDeser();
byte[] json = serdeser.toJsonBytes(indexer);
IndexerDefinition indexer2 = serdeser.fromJsonBytes(json).build();
assertEquals("index1", indexer2.getName());
assertEquals(LifecycleState.DELETE_REQUESTED, indexer2.getLifecycleState());
assertEquals(BatchIndexingState.BUILDING, indexer2.getBatchIndexingState());
assertEquals(IncrementalIndexingState.SUBSCRIBE_DO_NOT_CONSUME, indexer2.getIncrementalIndexingState());