Source:
<code>public void testFilter() throws Exception { Topology topology = Topology.builder() .addComputation(() -> new ComputationForward("C1", 1, 1), Arrays.asList("i1:input", "o1:output")) .build(); Settings settings = new Settings(1, 1); ChangeFilter changeFilter = new ChangeFilter(); settings.addFilter("input", new SkipFilter()); settings.addFilter("input", changeFilter); try (LogManager manager = getLogManager()) { StreamManager streamManager = new LogStreamManager(manager); streamManager.register("processor", topology, settings); StreamProcessor processor = streamManager.createStreamProcessor("processor"); processor.start(); LogOffset offset = streamManager.append("input", Record.of("keepMeLikeThis", null)); <START> offset = streamManager.append("input", Record.of("skipMeOnAppend", null)); <END> streamManager.append("input", Record.of("changeMeOnAppend", null)); streamManager.append("input", Record.of("skipMeOnRead", null)); streamManager.append("input", Record.of("changeMeOnRead", null)); assertTrue(processor.drainAndStop(Duration.ofMinutes(1))); try (LogTailer<Record> tailer = manager.createTailer("test", "output")) { LogRecord<Record> logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("keepMeLikeThis", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("changedOnAppend", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("changedOnRead", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNull(logRecord); } } }</code><technical_language>Is offset needed</technical_language>

Target:
public void testFilter() throws Exception { Topology topology = Topology.builder() .addComputation(() -> new ComputationForward("C1", 1, 1), Arrays.asList("i1:input", "o1:output")) .build(); Settings settings = new Settings(1, 1); ChangeFilter changeFilter = new ChangeFilter(); settings.addFilter("input", new SkipFilter()); settings.addFilter("input", changeFilter); try (LogManager manager = getLogManager()) { StreamManager streamManager = new LogStreamManager(manager); StreamProcessor processor = streamManager.registerAndCreateProcessor("processor", topology, settings); processor.start(); streamManager.append("input", Record.of("keepMeLikeThis", null)); streamManager.append("input", Record.of("skipMeOnAppend", null)); streamManager.append("input", Record.of("changeMeOnAppend", null)); streamManager.append("input", Record.of("skipMeOnRead", null)); streamManager.append("input", Record.of("changeMeOnRead", null)); assertTrue(processor.drainAndStop(Duration.ofMinutes(1))); try (LogTailer<Record> tailer = manager.createTailer("test", "output")) { LogRecord<Record> logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("keepMeLikeThis", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("changedOnAppend", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNotNull(logRecord); assertEquals("changedOnRead", logRecord.message().getKey()); logRecord = tailer.read(Duration.ofSeconds(1)); assertNull(logRecord); } } }