void () { final StringBuffer buf = new StringBuffer(); final IDEATestNGRemoteListener listener = createListener(buf); final MockTestNGResult result = new MockTestNGResult("ATest", "testMe", null, new Object[]{null, null}); listener.onTestStart(result); listener.onTestFinished(result); Assert.assertEquals("output: " + buf, """ ##teamcity[enteredTheMatrix] ##teamcity[testSuiteStarted name ='ATest' locationHint = 'java:suite://ATest'] ##teamcity[testStarted name='ATest.testMe|[null, null|]' locationHint='java:test://ATest/testMe'] ##teamcity[testFinished name='ATest.testMe|[null, null|]'] """, StringUtil.convertLineSeparators(buf.toString())); }