@Test (expected = PluginLoaderException.class)
public void checkPluginLoaderOnLoadBrokenJarFile()
        throws Exception {

    Checker checker = new Checker();
    ExpansibleURLClassLoader cl = new ExpansibleURLClassLoader(new URL[]{});
    IPluginLoaderVisitor<String> visitor = mock(IPluginLoaderVisitor.class);
    IPluginLoader<Collection<IPath>> pl = new PluginLoader(
            cl,
            (t) -> {
                try {
                    checker.wasCalled = true;
                } catch (Exception e) {
                    throw new RuntimeException("Could not create instance of IPlugin");
                }
            },
            visitor);
    URL url = this.getClass().getClassLoader().getResource("broken.jar");
    if (null == url) {
        fail();
    }
    Collection<IPath> files = new ArrayList<IPath>(){{add(new Path(url.getPath()));}};
    pl.loadPlugin(files);
    assertTrue(checker.wasCalled);
    fail();
}