Object target = testContext.getTestInstance();
ExtractorMethodCallback method = new ExtractorMethodCallback(JobExecution.class, "getJobExecution");
ReflectionUtils.doWithMethods(target.getClass(), method);
if (method.getName() != null) {
HippyMethodInvoker invoker = new HippyMethodInvoker();
invoker.setTargetObject(target);
invoker.setTargetMethod(method.getName());
try {
invoker.prepare();
return (JobExecution) invoker.invoke();
}
catch (Exception e) {
throw new IllegalArgumentException("Could not create job execution from method: " + method.getName(),
e);
}