public Optional<File> get(InstalledPlugin plugin) {
    // Does not fail if another process tries to create the directory at the same time.
    Path jarInCache = jarInCache(plugin.key, plugin.hash);
    if (Files.isRegularFile(jarInCache)) {
      return Optional.of(jarInCache.toFile());
    }
    return download(plugin).map(Path::toFile);
  }
@Test
  void fail_if_md5_header_is_missing_from_response(@TempDir Path tempDir) throws IOException {
    var tempJar = Files.createTempFile(tempDir, "plugin", ".jar");
    stubDownload(tempJar, null);
    InstalledPlugin plugin = newInstalledPlugin("foo", "abc");

    expectISE("foo", "did not return header Sonar-MD5", () -> underTest.get(plugin));
  }