void () { mySplitter = createEventSplitter(true, false); mySplitter.process("a", ProcessOutputTypes.STDOUT); mySplitter.process("bc", ProcessOutputTypes.STDOUT); mySplitter.process("d##teamcity[start]\n", ProcessOutputTypes.STDOUT); mySplitter.process("bc", ProcessOutputTypes.STDOUT); mySplitter.flush(); Assert.assertEquals( "Must be flushed on new line and TC message start", Arrays.asList("abcd", "##teamcity[start]\n", "bc"), myOutput.get(ProcessOutputTypes.STDOUT).toList()); }