void () { final StringBuffer buf = new StringBuffer(); final IDEATestNGRemoteListener listener = createListener(buf); listener.onStart((ISuite)null); listener.onTestFailure(new MockTestNGResult("ATest", "testName", createExceptionWithoutTrace(), ArrayUtilRt.EMPTY_OBJECT_ARRAY)); listener.onFinish((ISuite)null); Assert.assertEquals("output: " + buf, """ ##teamcity[enteredTheMatrix] ##teamcity[testSuiteStarted name ='ATest' locationHint = 'java:suite://ATest'] ##teamcity[testStarted name='ATest.testName' locationHint='java:test://ATest/testName'] ##teamcity[testFailed name='ATest.testName' error='true' message='' details='java.lang.Exception|n'] ##teamcity[testFinished name='ATest.testName'] ##teamcity[testSuiteFinished name='ATest'] """, StringUtil.convertLineSeparators(buf.toString())); }