private Statement nextChainedInvoker(Statement methodInvoker) { Field[] declaredFields = methodInvoker.getClass().getDeclaredFields(); for (Field field : declaredFields) { Statement statement = statementOrNull(methodInvoker, field); if (statement != null) return statement; } return null; }
private void runMethodInvoker( RunNotifier notifier, Description description, Statement methodInvoker, Description methodWithParams) { try { methodInvoker.evaluate(); } catch (Throwable e) { notifier.fireTestFailure(new Failure(methodWithParams, e)); } }