### Question:
ColorGradient { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final ColorGradient other = (ColorGradient) object; return x1 == other.x1 && x2 == other.x2 && y1 == other.y1 && y2 == other.y2 && color1.equals(other.color1) && color2.equals(other.color2); } ColorGradient(int x1, int y1, ColorRgba color1, int x2, int y2, ColorRgba color2); int getX1(); int getY1(); ColorRgba getColor1(); int getX2(); int getY2(); ColorRgba getColor2(); @Override int hashCode(); @Override boolean equals(Object object);  }### Answer:
@Test void testEquals() { final ColorGradient color = new ColorGradient(0, 1, ColorRgba.BLACK, 2, 3, ColorRgba.WHITE); assertEquals(color, color); assertEquals(color, new ColorGradient(0, 1, ColorRgba.BLACK, 2, 3, ColorRgba.WHITE)); assertNotEquals(color, null); assertNotEquals(color, new Object()); assertNotEquals(color, new ColorGradient(1, 1, ColorRgba.BLACK, 2, 3, ColorRgba.WHITE)); assertNotEquals(color, new ColorGradient(0, 0, ColorRgba.BLACK, 2, 3, ColorRgba.WHITE)); assertNotEquals(color, new ColorGradient(0, 1, ColorRgba.WHITE, 2, 3, ColorRgba.WHITE)); assertNotEquals(color, new ColorGradient(0, 1, ColorRgba.BLACK, 0, 3, ColorRgba.WHITE)); assertNotEquals(color, new ColorGradient(0, 1, ColorRgba.BLACK, 2, 0, ColorRgba.WHITE)); assertNotEquals(color, new ColorGradient(0, 1, ColorRgba.BLACK, 2, 3, ColorRgba.BLACK)); }