void () { final String text = "hello##"; mySplitter.process(text, ProcessOutputTypes.STDOUT); Assert.assertArrayEquals("Text prior to service message start prefix are flushed", new String[]{"hello"}, myOutput.get(ProcessOutputTypes.STDOUT).toArray()); mySplitter.flush(); Assert.assertArrayEquals("Rest of the string not flushed after explicit #flush call", new String[]{"hello", "##"}, myOutput.get(ProcessOutputTypes.STDOUT).toArray()); }