@Mutate public void useJovialExecuter(@Each Test task) { try { Method setter = Test.class.getDeclaredMethod("setTestExecuter", TestExecuter.class); setter.setAccessible(true); setter.invoke(task, new JovialTestExecuter()); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { throw new AssertionError("This setTestExecuter should exist.", e); } }
void setTestExecuter(TestExecuter testExecuter) { this.testExecuter = testExecuter; }