### Question:
LeastSquareResults { @Override public int hashCode() { int prime = 31; int result = 1; long temp; temp = Double.doubleToLongBits(_chiSq); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _covariance.hashCode(); result = prime * result + _parameters.hashCode(); result = prime * result + (_inverseJacobian == null ? 0 : _inverseJacobian.hashCode()); return result; } LeastSquareResults(LeastSquareResults from);  LeastSquareResults(double chiSq, DoubleArray parameters, DoubleMatrix covariance);  LeastSquareResults(
      double chiSq,
      DoubleArray parameters,
      DoubleMatrix covariance,
      DoubleMatrix inverseJacobian); double getChiSq(); DoubleArray getFitParameters(); DoubleMatrix getCovariance(); DoubleMatrix getFittingParameterSensitivityToData(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testHashCode() { LeastSquareResults ls1 = new LeastSquareResults(1.0, PARAMS, COVAR); LeastSquareResults ls2 = new LeastSquareResults(1.0, DoubleArray.of(1.0, 2.0), DoubleMatrix.copyOf(new double[][] {{0.1, 0.2}, {0.2, 0.3}})); assertThat(ls1.hashCode()).isEqualTo(ls2.hashCode()); ls2 = new LeastSquareResults(1.0, DoubleArray.of(1.0, 2.0), DoubleMatrix.copyOf(new double[][] {{0.1, 0.2}, {0.2, 0.3}}), null); assertThat(ls1.hashCode()).isEqualTo(ls2.hashCode()); ls1 = new LeastSquareResults(1.0, PARAMS, COVAR, INV_JAC); ls2 = new LeastSquareResults(1.0, DoubleArray.of(1.0, 2.0), DoubleMatrix.copyOf(new double[][] {{0.1, 0.2}, {0.2, 0.3}}), DoubleMatrix.copyOf(new double[][] {{0.5, 0.6}, {0.7, 0.8}})); assertThat(ls1.hashCode()).isEqualTo(ls2.hashCode()); }