public void invoke(TestCase<?, ?> testCase) throws Throwable {
        try {
            method.invoke(testCase);
        } catch (InvocationTargetException e) {
            Throwable cause = e.getCause();
            if (cause instanceof AssumptionViolatedException) {
                return;
            }
            if (cause instanceof UndeclaredThrowableException) {
                cause = ((UndeclaredThrowableException) cause).getUndeclaredThrowable();
                if (cause instanceof InvocationTargetException) {
                    cause = cause.getCause();
                }
            }
            if (expected != null) {
                if (!expected.isInstance(cause)) {
                    throw new AssertionError("Expected " + expected.getCanonicalName() + ", but was " + cause.getClass().getSimpleName(), cause);
                }
                return;
            }
            throw cause;
        }
        if (expected != null) {
            String me = /* o.getClass().getCanonicalName() + "." */method.toString();
            throw new AssertionError("Expected " + expected.getCanonicalName() + " for method " + me);
        }
    }