Iob { @Override public int hashCode() { int result; long temp; temp = Double.doubleToLongBits(iobContrib); result = (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(activityContrib); result = 31 * result + (int) (temp ^ (temp >>> 32)); return result; }  Iob iobContrib(double iobContrib); Iob activityContrib(double activityContrib); Iob plus(Iob iob); @Override boolean equals(Object o); @Override int hashCode(); public double iobContrib; public double activityContrib; }
@Test public void hashCodeTest() { Iob a = new Iob().iobContrib(1).activityContrib(2); Assert.assertNotEquals(0, a.hashCode()); }