final FailureTrackingTestListener listener = new FailureTrackingTestListener();
final TestNG testNG = new TestNG();
testNG.addListener(listener);
testNG.setTestClasses(new Class<?>[] { this.clazz });
testNG.setVerbose(0);
testNG.run();
assertEquals("Verifying number of test starts for test class [" + this.clazz + "].",
this.expectedTestStartCount, listener.testStartCount);
assertEquals("Verifying number of successful tests for test class [" + this.clazz + "].",
this.expectedTestSuccessCount, listener.testSuccessCount);