### Question:
Title extends AbstractBlock implements Block, Cloneable, Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Title)) { return false; } Title that = (Title) obj; if (this.visible != that.visible) { return false; } if (this.position != that.position) { return false; } if (this.horizontalAlignment != that.horizontalAlignment) { return false; } if (this.verticalAlignment != that.verticalAlignment) { return false; } if (this.notify != that.notify) { return false; } return super.equals(obj); } protected  Title(); protected  Title(RectangleEdge position,
            HorizontalAlignment horizontalAlignment, 
            VerticalAlignment verticalAlignment); protected  Title(RectangleEdge position, 
            HorizontalAlignment horizontalAlignment,
            VerticalAlignment verticalAlignment, RectangleInsets padding); boolean isVisible(); void setVisible(boolean visible); RectangleEdge getPosition(); void setPosition(RectangleEdge position); HorizontalAlignment getHorizontalAlignment(); void setHorizontalAlignment(HorizontalAlignment alignment); VerticalAlignment getVerticalAlignment(); void setVerticalAlignment(VerticalAlignment alignment); boolean getNotify(); void setNotify(boolean flag); @Override abstract void draw(Graphics2D g2, Rectangle2D area); @Override Object clone(); void addChangeListener(TitleChangeListener listener); void removeChangeListener(TitleChangeListener listener); @Override boolean equals(Object obj); @Override int hashCode(); static final RectangleEdge DEFAULT_POSITION; static final HorizontalAlignment DEFAULT_HORIZONTAL_ALIGNMENT; static final VerticalAlignment DEFAULT_VERTICAL_ALIGNMENT; static final RectangleInsets DEFAULT_PADDING; public boolean visible; }### Answer:
@Test public void testEquals() { Title t1 = new TextTitle(); Title t2 = new TextTitle(); assertEquals(t1, t2); t1.setPosition(RectangleEdge.LEFT); assertFalse(t1.equals(t2)); t2.setPosition(RectangleEdge.LEFT); assertEquals(t1, t2); t1.setHorizontalAlignment(HorizontalAlignment.RIGHT); assertFalse(t1.equals(t2)); t2.setHorizontalAlignment(HorizontalAlignment.RIGHT); assertEquals(t1, t2); t1.setVerticalAlignment(VerticalAlignment.BOTTOM); assertFalse(t1.equals(t2)); t2.setVerticalAlignment(VerticalAlignment.BOTTOM); assertEquals(t1, t2); t1.setVisible(false); assertFalse(t1.equals(t2)); t2.setVisible(false); assertEquals(t1, t2); }