void () { mySplitter.process("##teamcity[name1]##teamcity[name2]##teamcity[name3]##teamcit", ProcessOutputTypes.STDOUT); Assert.assertEquals(List.of("##teamcity[name1]", "##teamcity[name2]"), myOutput.get(ProcessOutputTypes.STDOUT).toList()); mySplitter.process("y[name4]\n", ProcessOutputTypes.STDOUT); Assert.assertEquals(List.of("##teamcity[name1]", "##teamcity[name2]", "##teamcity[name3]", "##teamcity[name4]\n"), myOutput.get(ProcessOutputTypes.STDOUT).toList()); }