@Test(description = "Ensure that if a listener is present, we get test(), onSuccess()," +
" afterMethod()")
public void listenerShouldBeCalledBeforeConfiguration() {
TestNG tng = create(OrderedListenerSampleTest.class);
tng.run();
Assert.assertEquals(SimpleListener.m_list, Arrays.asList(1, 2, 3, 4));
}
@Test(description = "TESTNG-400: onTestFailure should be called before @AfterMethod")
public void failureBeforeAfterMethod() {