Repository: exercism/java
Issue: saddle-points: unhelpful error message

When running the saddle-points tests you don't get a very descriptive error message (unless I'm doing something wrong). The error message I get is something along the lines of:

`expected:<MatrixCoordinate@1f> but was:<MatrixCoordinate@0`

Which isn't much help in finding out what you've done wrong. 

To improve this we could iterate over the sets and compare each point with a more detailed error message e.g.

`"Expected row to be " + expected.getRow() + " and it was " + actual.getRow()
                + ". Expected column to be " + expected.getCol() + " and it was " + actual.getCol() + ".";`

What do you think @exercism/java?

Changed files:
exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java, exercises/saddle-points/src/main/java/MatrixCoordinate.java

diff --git a/exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java b/exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java
index 140bf2ce..1180e2ca 100644
--- a/exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java
+++ b/exercises/saddle-points/.meta/src/reference/java/MatrixCoordinate.java
@@ -1,31 +1,33 @@
-final class MatrixCoordinate {
-
-  private final int row;
-
-  private final int col;
-
-  MatrixCoordinate(final int row, final int col) {
-    this.row = row;
-    this.col = col;
-  }
-
-  // Generated equals and hashcode.
-
-  @Override
-  public boolean equals(final Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
-
-    final MatrixCoordinate that = (MatrixCoordinate) o;
-
-    return row == that.row && col == that.col;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = row;
-    result = 31 * result + col;
-    return result;
-  }
-
+class MatrixCoordinate {
+    private final int row;
+    private final int col;
+
+    MatrixCoordinate(final int row, final int col) {
+        this.row = row;
+        this.col = col;
+    }
+
+    @Override
+    public String toString() {
+        return "Row: " + row + ", Column: " + col;
+    }
+
+    // Generated equals and hashcode.
+
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        final MatrixCoordinate that = (MatrixCoordinate) o;
+
+        return row == that.row && col == that.col;
+    }
+
+    @Override
+    public int hashCode() {
+        int result = row;
+        result = 31 * result + col;
+        return result;
+    }
 }
diff --git a/exercises/saddle-points/src/main/java/MatrixCoordinate.java b/exercises/saddle-points/src/main/java/MatrixCoordinate.java
index 6c35e9ab..1180e2ca 100644
--- a/exercises/saddle-points/src/main/java/MatrixCoordinate.java
+++ b/exercises/saddle-points/src/main/java/MatrixCoordinate.java
@@ -1,31 +1,33 @@
 class MatrixCoordinate {
+    private final int row;
+    private final int col;
 
-  private final int row;
+    MatrixCoordinate(final int row, final int col) {
+        this.row = row;
+        this.col = col;
+    }
 
-  private final int col;
+    @Override
+    public String toString() {
+        return "Row: " + row + ", Column: " + col;
+    }
 
-  MatrixCoordinate(final int row, final int col) {
-    this.row = row;
-    this.col = col;
-  }
+    // Generated equals and hashcode.
 
-  // Generated equals and hashcode.
+    @Override
+    public boolean equals(final Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
 
-  @Override
-  public boolean equals(final Object o) {
-    if (this == o) return true;
-    if (o == null || getClass() != o.getClass()) return false;
+        final MatrixCoordinate that = (MatrixCoordinate) o;
 
-    final MatrixCoordinate that = (MatrixCoordinate) o;
-
-    return row == that.row && col == that.col;
-  }
-
-  @Override
-  public int hashCode() {
-    int result = row;
-    result = 31 * result + col;
-    return result;
-  }
+        return row == that.row && col == that.col;
+    }
 
+    @Override
+    public int hashCode() {
+        int result = row;
+        result = 31 * result + col;
+        return result;
+    }
 }