@Override
  protected Class<?> loadClass(final String name, final boolean resolve)
      throws ClassNotFoundException {
    if (blacklist.test(name)) {
      throw new ClassNotFoundException("The requested class is not permitted to be used from a "
          + "udf. Class " + name);
    }
    Class<?> clazz = findLoadedClass(name);
    if (clazz == null) {
      try {
        if (shouldLoadFromChild(name)) {
          clazz = findClass(name);
        }
      } catch (final ClassNotFoundException e) {
        logger.trace("Class {} not found in {} using parent classloader",
            name,
            path);
      }
    }
    if (clazz == null) {
      clazz =  super.loadClass(name, false);
    }
    if (resolve) {
      resolveClass(clazz);
    }
    return clazz;
  }
@Test
  public void shouldLoadClassesFromParentIfNotFoundInChild() throws ClassNotFoundException {
    assertThat(udfClassLoader.loadClass(ONLY_IN_PARENT, true), equalTo(OnlyInParent.class));
  }