@Test
  public void testLegalPaths() {
    ClassLoader rootLoader = Thread.currentThread().getContextClassLoader();
    List<String> newPaths = Arrays.asList("file://a/aa", "c/cc", "/bb/b");
    String userDir = System.getProperty("user.dir");
    List<String> expectedURLs = Arrays.asList(
        "file://a/aa",
        "file:" + userDir + "/c/cc",
        "file:/bb/b");
    AddToClassPathAction action = new AddToClassPathAction(rootLoader, newPaths);
    UDFClassLoader loader = AccessController.doPrivileged(action);
    assertURLsMatch(expectedURLs, loader.getURLs());
  }
Minimal tests for AddToClassPathAction class. Most of the tests don't use
{@link java.security.AccessController#doPrivileged(java.security.PrivilegedAction)},
presumably the tests will not be executed under security manager.
ql/src/test/org/apache/hadoop/hive/ql/exec/TestAddToClassPathAction.java