### Question:
BundleClassloaderWrapper extends ClassLoader { @Override public Class<?> findClass( String name ) throws ClassNotFoundException { return bundle.loadClass( name ); } BundleClassloaderWrapper( Bundle bundle );  BundleClassloaderWrapper( Bundle bundle, ClassLoader parent ); @Override Enumeration<URL> findResources( String name ); @Override URL findResource( String name ); @Override Class<?> findClass( String name ); @Override URL getResource( String name ); Bundle getBundle();  }### Answer:
@Test public void testFindClass() throws ClassNotFoundException { Class result = Map.class; String name = "RESOURCE"; when( bundle.loadClass( name ) ).thenReturn( result ); BundleClassloaderWrapper bundleClassloaderWrapper = new BundleClassloaderWrapper( bundle ); assertEquals( result, bundleClassloaderWrapper.loadClass( name ) ); }