@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 copy_and_extract_libs() throws IOException {
    File jar = loadFile("sonar-checkstyle-plugin-2.8.jar");
    ExplodedPlugin exploded = underTest.explode(PluginInfo.create(jar));

    assertThat(exploded.getKey()).isEqualTo("checkstyle");
    assertThat(exploded.getMain()).isFile().exists();
    assertThat(exploded.getLibs()).extracting(File::getName).containsExactlyInAnyOrder("antlr-2.7.6.jar", "checkstyle-5.1.jar", "commons-cli-1.0.jar");
    assertThat(new File(jar.getParent(), "sonar-checkstyle-plugin-2.8.jar")).exists();
    assertThat(new File(jar.getParent(), "sonar-checkstyle-plugin-2.8.jar_unzip/META-INF/lib/checkstyle-5.1.jar")).exists();
  }