junit/testng: pattern configuration isValid respect to chosen method