@Test public void testSink() throws Exception { Topology t = newTopology(); TStream<String> s = t.strings("a", "b", "c"); List<String> sinked = new ArrayList<>(); TSink<String> terminal = s.sink(tuple -> sinked.add(tuple)); assertNotNull(terminal); assertSame(t, terminal.topology()); assertSame(s, terminal.getFeed()); TStream<String> s1 = s.filter(tuple -> true); Condition<Long> tc = t.getTester().tupleCount(s1, 3); complete(t, tc); assertEquals("a", sinked.get(0)); assertEquals("b", sinked.get(1)); assertEquals("c", sinked.get(2)); }