### Question:
ClassUtil { public static boolean assignable( final String srcClassName, final String parentClassName ) { try { final Class< ? > src = Class.forName( srcClassName ); final Class< ? > parent = Class.forName( parentClassName ); return parent.isAssignableFrom( src ); } catch( final Exception e ) { log.error( e.getMessage(), e ); } return false; } private  ClassUtil(); static Class<?> findClass( final List< String > packages,  final List< String > externaljars, final String className ); static Class< ? > findClass( final String packageName, final String className ); static List< String > classpathEntriesUnder( final String rootPackage ); @SuppressWarnings("unchecked") static T getMappedObject( final String requestedClass ); @SuppressWarnings( "unchecked" ) static T getMappedObject( final String requestedClass, final Object... initargs ); static Class< ? > getMappedClass( final String requestedClass ); static boolean assignable( final String srcClassName, final String parentClassName ); static boolean exists( final String className ); static Map< String, String > getExtraClassMappings(); static final String MAPPINGS; static final String MAPPINGS_EXTRA; }### Answer:
@Test public void testAssignable() { Assertions.assertTrue( ClassUtil.assignable( "java.util.ArrayList", "java.util.List" ) ); Assertions.assertFalse( ClassUtil.assignable( "java.util.List", "java.util.ArrayList" ) ); Assertions.assertFalse( ClassUtil.assignable( null, "java.util.ArrayList" ) ); Assertions.assertFalse( ClassUtil.assignable( "java.util.List", null ) ); Assertions.assertFalse( ClassUtil.assignable( "java.util.List", "java.util.HashMap" ) ); }