void () { final StringBuffer buf = new StringBuffer(); final IDEATestNGRemoteListener listener = createListener(buf); final String className = "a.ATest"; listener.onSuiteStart(className, true); final MockTestNGResult setUp = new MockTestNGResult(className, "setUp", createExceptionWithoutTrace(), ArrayUtilRt.EMPTY_OBJECT_ARRAY); listener.onConfigurationStart(setUp); listener.onConfigurationFailure(setUp); listener.onSuiteFinish(className); Assert.assertEquals("output: " + buf, """ ##teamcity[enteredTheMatrix] ##teamcity[testSuiteStarted name ='ATest' locationHint = 'java:suite://a.ATest'] ##teamcity[testStarted name='ATest.setUp' locationHint='java:test://a.ATest/setUp' config='true'] ##teamcity[testFailed name='ATest.setUp' error='true' message='' details='java.lang.Exception|n'] ##teamcity[testFinished name='ATest.setUp'] ##teamcity[testSuiteFinished name='a.ATest'] """, StringUtil.convertLineSeparators(buf.toString())); }