Constructor constructor= reloadedTestClass.getConstructor(classArgs); Object[] args= new Object[]{testName}; reloadedTest=(Test)constructor.newInstance(args);
Constructor constructor= null; try { constructor= reloadedTestClass.getConstructor(classArgs); reloadedTest= (Test)constructor.newInstance(new Object[]{testName}); } catch (NoSuchMethodException e) {  constructor= reloadedTestClass.getConstructor(new Class[0]); reloadedTest= (Test)constructor.newInstance(new Object[0]); if (reloadedTest instanceof TestCase) ((TestCase) reloadedTest).setName(testName); }
	public void rerunTest(String className, String testName) {		Test reloadedTest= null;		try {			Class reloadedTestClass= getClassLoader().loadClass(className);			Class[] classArgs= { String.class };			Constructor constructor= reloadedTestClass.getConstructor(classArgs);			Object[] args= new Object[]{testName};			reloadedTest=(Test)constructor.newInstance(args);		} catch(Exception e) {			runFailed(JUnitMessages.getFormattedString("RemoteTestRunner.error.load", reloadedTest )); //$NON-NLS-1$			return;		}		TestResult result= new TestResult();		reloadedTest.run(result);		notifyTestReran(result, className, testName);	}