@Override
  public ExplodedPlugin explode(PluginInfo info) {
    try {
      File dir = unzipFile(info.getNonNullJarFile());
      return explodeFromUnzippedDir(info, info.getNonNullJarFile(), dir);
    } catch (Exception e) {
      throw new IllegalStateException(String.format("Fail to open plugin [%s]: %s", info.getKey(), info.getNonNullJarFile().getAbsolutePath()), e);
    }
  }
@Test
  public void retry_on_locked_file() throws IOException {
    File jar = loadFile("sonar-checkstyle-plugin-2.8.jar");
    File lockFile = new File(jar.getParentFile(), jar.getName() + "_unzip.lock");
    try (FileOutputStream out = new FileOutputStream(lockFile)) {
      FileLock lock = out.getChannel().lock();
      try {
        PluginInfo pluginInfo = PluginInfo.create(jar);
        assertThatExceptionOfType(IllegalStateException.class)
          .isThrownBy(() -> underTest.explode(pluginInfo))
          .withMessage("Fail to open plugin [checkstyle]: " + jar)
          .withCauseExactlyInstanceOf(IOException.class);
      } finally {
        lock.release();
      }
    }
  }