boolean (Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; MockTestNGResult result = (MockTestNGResult)o; if (!myClassName.equals(result.myClassName)) return false; if (!myMethodName.equals(result.myMethodName)) return false; if (!Objects.equals(myThrowable, result.myThrowable)) return false; // Probably incorrect - comparing Object[] arrays with Arrays.equals if (!Arrays.equals(myParams, result.myParams)) return false; return true; }