### Question:
PluginClassLoader extends ClassLoader { public List<URL> getPolicyDefinitionResources() { List<URL> resources = new ArrayList<>(); Enumeration<? extends ZipEntry> entries = this.pluginArtifactZip.entries(); while (entries.hasMoreElements()) { ZipEntry zipEntry = entries.nextElement(); if (zipEntry.getName().toLowerCase().startsWith("meta-inf/apiman/policydefs/") && zipEntry.getName().toLowerCase().endsWith(".json")) { try { resources.add(extractResource(zipEntry)); } catch (IOException e) { throw new RuntimeException(e); } } } return resources; } PluginClassLoader(File pluginArtifactFile);  PluginClassLoader(File pluginArtifactFile, ClassLoader parent); void close(); List<URL> getPolicyDefinitionResources();  }### Answer:
@Test public void testGetPolicyDefinitionResources() throws Exception { File file = new File("src/test/resources/plugin-with-policyDefs.war"); if (!file.exists()) { throw new Exception("Failed to find test WAR: plugin-with-policyDefs.war at: " + file.getAbsolutePath()); } PluginClassLoader classloader = new TestPluginClassLoader(file); List<URL> resources = classloader.getPolicyDefinitionResources(); Assert.assertNotNull(resources); Assert.assertEquals(2, resources.size()); URL url = resources.get(0); Assert.assertNotNull(url); Assert.assertTrue(url.toString().contains("META-INF/apiman/policyDefs")); }