private AssertionError createComparisonFailure(String className,String expected,String actual) throws Exception {
  Class<?> clazz=Class.forName(className);
  Constructor<?> constructor=clazz.getConstructor(String.class,String.class,String.class);
  return (AssertionError)constructor.newInstance("",expected,actual);
}

private AssertionError createComparisonFailure ( String className , String expected , String actual ) throws Exception { Class < ? > clazz = Class . forName ( className ) ; Constructor < ? > constructor = clazz . getConstructor ( String . class , String . class , String . class ) ; return ( AssertionError ) constructor . newInstance ( "" , expected , actual ) ; }
attempts to create an instance of junit ' s comparisonfailure exception using reflection .
