Now if I run this testng.xml everything works fine except the "onFinish" method. The system out always returns null. But when I run the test individually without testng.xml or when I don't run tests in parallel by enabling it in testng.xml it works fine. The system.out results value normally. Why is this happening?