newMethod = new FrameworkMethod(methodFromNewlyLoadedClass);
}
catch (ClassNotFoundException e)
{
// Show any problem nicely as a JUnit Test failure.
return new Fail(e);
}
catch (SecurityException e)
{
return new Fail(e);
}
catch (NoSuchMethodException e)
{
return new Fail(e);
}
// We can carry out the normal JUnit functionality with our newly discoverd method now.
return super.methodBlock(newMethod);
}