/**
* Confirm that cloning works.
*/
public void testCloning() {
CompositeTitle t1 = new CompositeTitle(new BlockContainer());
t1.getContainer().add(new TextTitle("T1"));
CompositeTitle t2 = null;
try {
t2 = (CompositeTitle) t1.clone();
}
catch (CloneNotSupportedException e) {
fail(e.toString());
}
assertTrue(t1 != t2);
assertTrue(t1.getClass() == t2.getClass());
assertTrue(t1.equals(t2));
}