Runner { public static IApplication getApplicationFromName(String name) throws ClassNotFoundException, IllegalAccessException, InstantiationException { return (IApplication) Class.forName(name).newInstance(); }  static void main(String[] args); static void run(String name); static void runBenchmark(IBenchmark benchmark); static void runProducer(IProducer producer); static IApplication getApplicationFromName(String name);  }
@Test(dataProvider = "getValidNames") public void getBenchmarkFromValidName(String validName) throws Exception { assertTrue(Runner.getApplicationFromName(validName) instanceof IApplication); }
@Test(dataProvider = "getInValidNames", expectedExceptions = ClassNotFoundException.class) public void throwsExceptionFromInvalidName(String invalidName) throws InstantiationException, IllegalAccessException, ClassNotFoundException { Runner.getApplicationFromName(invalidName); }