### Question:
GradientXYBarPainter implements XYBarPainter, Serializable { @Override public int hashCode() { int hash = 37; hash = HashUtils.hashCode(hash, this.g1); hash = HashUtils.hashCode(hash, this.g2); hash = HashUtils.hashCode(hash, this.g3); return hash; } GradientXYBarPainter();  GradientXYBarPainter(double g1, double g2, double g3); @Override void paintBar(Graphics2D g2, XYBarRenderer renderer, int row,
            int column, RectangularShape bar, RectangleEdge base); @Override void paintBarShadow(Graphics2D g2, XYBarRenderer renderer, int row,
            int column, RectangularShape bar, RectangleEdge base,
            boolean pegShadow); @Override boolean equals(Object obj); @Override int hashCode();  }### Answer:
@Test public void testHashcode() { GradientXYBarPainter p1 = new GradientXYBarPainter(0.1, 0.2, 0.3); GradientXYBarPainter p2 = new GradientXYBarPainter(0.1, 0.2, 0.3); assertEquals(p1, p2); int h1 = p1.hashCode(); int h2 = p2.hashCode(); assertEquals(h1, h2); }