AmazonS3Object { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if ((obj == null) || (getClass() != obj.getClass())) { return false; } final AmazonS3Object other = (AmazonS3Object) obj; return Objects.equals(region, other.region) && Objects.equals(bucketName, other.bucketName) && Objects.equals(key, other.key) && Objects.equals(size, other.size) && Objects.equals(eTag, other.eTag) && Objects.equals(versionId, other.versionId); } AmazonS3Object(
      final String region,
      final String bucketName,
      final String key,
      final long size,
      @Nullable final String eTag,
      @Nullable final String versionId); String getRegion(); String getBucketName(); String getKey(); long getSize(); Optional<String> getETag(); Optional<String> getVersionId(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { final AmazonS3Object object2 = new AmazonS3Object( "us-east-1", "bucket-name", "object-key", 100, "object eTag", "object version"); assertThat(object).isEqualTo(object2); }