package com.indeed.proctor.store;

import java.util.Objects;
import java.util.Set;

/**
 * Details of a single revision
 */
public class RevisionDetails {
    private final Revision revision;
    private final Set<String> modifiedTests;

    public RevisionDetails(
            final Revision revision,
            final Set<String> modifiedTests
    ) {
        this.revision = revision;
        this.modifiedTests = modifiedTests;
    }

    public Revision getRevision() {
        return revision;
    }

    public Set<String> getModifiedTests() {
        return modifiedTests;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final RevisionDetails that = (RevisionDetails) o;
        return Objects.equals(revision, that.revision) &&
                Objects.equals(modifiedTests, that.modifiedTests);
    }

    @Override
    public int hashCode() {
        return Objects.hash(revision, modifiedTests);
    }

    @Override
    public String toString() {
        return com.google.common.base.Objects.toStringHelper(this)
                .add("revision", revision)
                .add("modifiedTests", modifiedTests)
                .toString();
    }
}

package com.indeed.proctor.store;

import java.util.List;
import java.util.Objects;

/**
 * Details of a single revision
 */
public class RevisionDetails {
    private final Revision revision;
    private final List<String> modifiedTests;

    public RevisionDetails(
            final Revision revision,
            final List<String> modifiedTests
    ) {
        this.revision = revision;
        this.modifiedTests = modifiedTests;
    }

    public Revision getRevision() {
        return revision;
    }

    public List<String> getModifiedTests() {
        return modifiedTests;
    }

    @Override
    public boolean equals(final Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        final RevisionDetails that = (RevisionDetails) o;
        return Objects.equals(modifiedTests, that.modifiedTests);
    }

    @Override
    public int hashCode() {
        return Objects.hash(modifiedTests);
    }
}

--- 
+++ 
@@ -1,18 +1,18 @@
 package com.indeed.proctor.store;
 
-import java.util.List;
 import java.util.Objects;
+import java.util.Set;
 
 /**
  * Details of a single revision
  */
 public class RevisionDetails {
     private final Revision revision;
-    private final List<String> modifiedTests;
+    private final Set<String> modifiedTests;
 
     public RevisionDetails(
             final Revision revision,
-            final List<String> modifiedTests
+            final Set<String> modifiedTests
     ) {
         this.revision = revision;
         this.modifiedTests = modifiedTests;
@@ -22,7 +22,7 @@
         return revision;
     }
 
-    public List<String> getModifiedTests() {
+    public Set<String> getModifiedTests() {
         return modifiedTests;
     }
 
@@ -35,11 +35,20 @@
             return false;
         }
         final RevisionDetails that = (RevisionDetails) o;
-        return Objects.equals(modifiedTests, that.modifiedTests);
+        return Objects.equals(revision, that.revision) &&
+                Objects.equals(modifiedTests, that.modifiedTests);
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(modifiedTests);
+        return Objects.hash(revision, modifiedTests);
+    }
+
+    @Override
+    public String toString() {
+        return com.google.common.base.Objects.toStringHelper(this)
+                .add("revision", revision)
+                .add("modifiedTests", modifiedTests)
+                .toString();
     }
 }
PROC-592: Use set for modified tests in revision details
