PluginManager { String findPluginDeploymentDir(String contextRootDir) throws IOException { final Collection<File> gwtFiles = FileUtils.listFiles(new File(encodePath(contextRootDir)), new String[]{"nocache.js"}, true); if (!gwtFiles.isEmpty()) { final File gwtFile = gwtFiles.iterator().next(); return gwtFile.getParentFile().getCanonicalPath(); } return new File(contextRootDir).getCanonicalPath(); } @Inject  PluginManager(final PluginWatcher pluginWatcher,
                         final PluginJarProcessor pluginJarProcessor); void init(final String contextRootDir,
                     final String pluginDir);  }
@Test public void findPluginDeploymentDir() throws Exception { PluginManager managerSpy = spy(manager); final String pluginDeploymentDir = managerSpy.findPluginDeploymentDir(contextRootDir); verify(managerSpy).encodePath(contextRootDir); assertEquals(this.pluginDeploymentDir, pluginDeploymentDir); }