public Map getFilesWithPathInFolder()

in src/it/java/com/epam/digital/data/platform/excerpt/worker/TemplateCephServiceMockHelper.java [47:59]


  public Map<String, byte[]> getFilesWithPathInFolder(String templatePath) {
    Map<String, byte[]> files = new HashMap<>();
    try (var fis = new FileInputStream("src/it/resources/" + templatePath);
        var zip = new ZipInputStream(fis)) {
      ZipEntry zipEntry;
      while ((zipEntry = zip.getNextEntry()) != null) {
        files.put(zipEntry.getName(), zip.readAllBytes());
      }
    } catch (Exception e) {
      throw new RuntimeException();
    }
    return files;
  }