@Test(dataProvider = "methodParamFailingPairs") public void testNegativeCaseMatcher(final String methodName, final Object[] params, final ITestContext iTestContext, final ITestResult iTestResult) { final Method method = getMethod(methodName); final MethodMatcher matcher = new DataProviderMethodMatcher( new MethodMatcherContext(method, params, iTestContext, iTestResult)); Assert.assertFalse(matcher.conforms()); try { method.invoke(new TestMethodMatcher(), matcher.getConformingArguments()); Assert.fail(); } catch (final Throwable throwable) { throwable.printStackTrace(); //noop } }