assertEquals(Dummy[].class, ClassLoaderUtil.loadClass(dummyClassName + "[]"));
assertEquals(Dummy[][].class, ClassLoaderUtil.loadClass(dummyClassName + "[][]"));
// special case
DefaultClassLoaderStrategy defaultClassLoaderStrategy = (DefaultClassLoaderStrategy) JoddCore.classLoaderStrategy;
defaultClassLoaderStrategy.setLoadArrayClassByComponentTypes(true);
URLClassLoader parentClassloader = (URLClassLoader)this.getClass().getClassLoader();
URL[] urls = parentClassloader.getURLs();
ExtendedURLClassLoader excl = new ExtendedURLClassLoader(urls, parentClassloader, false);
Class dummyClass = ClassLoaderUtil.loadClass(dummyClassName, excl);
assertFalse(Dummy.class == dummyClass); // classes are NOT the same as they are loaded by different class loaders
assertEquals(Dummy.class.getName(), dummyClass.getName());
// special case with array!
Class dummyClassArray = ClassLoaderUtil.loadClass(dummyClassName + "[]", excl);
assertFalse(Dummy[].class == dummyClassArray);
assertEquals(Dummy[].class.getName(), dummyClassArray.getName());
defaultClassLoaderStrategy.setLoadArrayClassByComponentTypes(false);
}