@Test
public void test_get_plugin_url_with_subdirectory() throws Exception {

    pluginFolder.newFolder("target_dir", "my_plugin", "dist").toPath().resolve("main.js").toFile().createNewFile();
    Path packageJson = pluginFolder.getRoot().toPath().resolve("target_dir").resolve("my_plugin").resolve("package.json");
    Files.write(packageJson, asList("{", "\"main\":\"dist/main.js\"", "}"));
    assertThat(new PluginService().getPluginUrl(pluginFolder.getRoot().toPath().resolve("target_dir").resolve("my_plugin"))).
            isEqualTo("/plugins/my_plugin/dist/main.js");
}