Inside TestNG test method, I am using this.getClass().getEnclosingMethod().getName() to get the current method name but it gives failure exception as java.lang.NullPointerException
I am unsure, what would be the problem?
Assert.assertEquals(this.getClass().getEnclosingMethod().getName(), testcaseName);