/**
     * @param bundle
     * @param className
     * @return
     */
    private static Class<?> loadClassFromBundle(Bundle bundle, String className)
        throws ClassNotFoundException {
      Class<?> klazz = null;

      if (Platform.isFragment(bundle)) {
        // Need to use the bundle's host for loading the class
        Bundle[] hosts = Platform.getHosts(bundle);
        if (hosts == null) {
          TestDesignerPlugin.logWarning("Cannot test fragment as NO host!"); // $NON-NLS-1$
          return klazz;
        }

        for (Bundle host : hosts) {
          klazz = host.loadClass(className);
          if (klazz != null) {
            break;
          }
        }
      } else {
        klazz = bundle.loadClass(className);
      }

      return klazz;
    }