code: public static File zip(File directory) throws IOException {
  
      Assert.isTrue(FileUtils.isDirectory(directory), "[%s] is not a valid directory", directory);
  
      File zip = new File(directory.getParent(), directory.getName().concat(ZIP_FILE_EXTENSION));
  
      Assert.state(zip.createNewFile(), "Failed to create new ZIP file [%s]", zip);
  
      try (ZipOutputStream outputStream = new ZipOutputStream(new FileOutputStream(zip, false))) {
        zip(directory, directory, outputStream);
        outputStream.finish();
      }
  
      return zip;
    }
docs: Zips the contents of the specified {@link File directory}.
  
  @param directory {@link File} referring to the file system path/location containing the contents to zip.
  @return a {@link File ZIP file} containing the compressed contents of the specified {@link File directory}.
  @throws IllegalArgumentException if {@link File directory} is not a valid directory.
  @throws IllegalStateException if the {@link File ZIP file } could not be created/initialized.
  @throws IOException if the contents of the specified {@link File directory} could not be zipped.
  @throws SystemException if a file system entry could not be added to the {@link File ZIP file}.
  @see #zip(File, File, ZipOutputStream)
  @see java.io.File