### Question:
ClassUtils { public static String findContainingJar(Class clazz) { ClassLoader loader = clazz.getClassLoader(); String class_file = clazz.getName().replaceAll("\\.", "/") + ".class"; try { for (Enumeration itr = loader.getResources(class_file); itr.hasMoreElements();) { URL url = (URL) itr.nextElement(); if ("jar".equals(url.getProtocol())) { String toReturn = url.getPath(); if (toReturn.startsWith("file:")) { toReturn = toReturn.substring("file:".length()); } toReturn = URLDecoder.decode(toReturn, StandardCharsets.UTF_8.name()); return toReturn.replaceAll("!.*$", ""); } } } catch (IOException e) { throw new RuntimeException(e); } return null; }  static String findContainingJar(Class clazz);  }### Answer:
@Test public void testContainingJar() { assertTrue(ClassUtils.findContainingJar(JSONArray.class).contains("json-simple")); }