MinimalZipEntry { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (int) (compressedSize ^ (compressedSize >>> 32)); result = prime * result + compressionMethod; result = prime * result + (int) (crc32OfUncompressedData ^ (crc32OfUncompressedData >>> 32)); result = prime * result + Arrays.hashCode(fileNameBytes); result = prime * result + (int) (fileOffsetOfCompressedData ^ (fileOffsetOfCompressedData >>> 32)); result = prime * result + (int) (fileOffsetOfLocalEntry ^ (fileOffsetOfLocalEntry >>> 32)); result = prime * result + (generalPurposeFlagBit11 ? 1231 : 1237); result = prime * result + (int) (uncompressedSize ^ (uncompressedSize >>> 32)); return result; } MinimalZipEntry(
      int compressionMethod,
      long crc32OfUncompressedData,
      long compressedSize,
      long uncompressedSize,
      byte[] fileNameBytes,
      boolean generalPurposeFlagBit11,
      long fileOffsetOfLocalEntry); void setFileOffsetOfCompressedData(long offset); int getCompressionMethod(); long getCrc32OfUncompressedData(); long getCompressedSize(); long getUncompressedSize(); byte[] getFileNameBytes(); String getFileName(); boolean getGeneralPurposeFlagBit11(); long getFileOffsetOfLocalEntry(); long getFileOffsetOfCompressedData(); boolean isDeflateCompressed(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testHashCode() { Set<MinimalZipEntry> hashSet = new HashSet<>(); hashSet.add(defaultEntry); hashSet.add(clonedDefaultEntry); Assert.assertEquals(1, hashSet.size()); hashSet.addAll(allMutations); Assert.assertEquals(1 + allMutations.size(), hashSet.size()); }