### Question:
TextAnnotation extends AbstractAnnotation implements Serializable { public void setRotationAnchor(TextAnchor anchor) { ParamChecks.nullNotPermitted(anchor, "anchor"); this.rotationAnchor = anchor; fireAnnotationChanged(); } protected  TextAnnotation(String text); String getText(); void setText(String text); Font getFont(); void setFont(Font font); Paint getPaint(); void setPaint(Paint paint); TextAnchor getTextAnchor(); void setTextAnchor(TextAnchor anchor); TextAnchor getRotationAnchor(); void setRotationAnchor(TextAnchor anchor); double getRotationAngle(); void setRotationAngle(double angle); @Override boolean equals(Object obj); @Override int hashCode(); static final Font DEFAULT_FONT; static final Paint DEFAULT_PAINT; static final TextAnchor DEFAULT_TEXT_ANCHOR; static final TextAnchor DEFAULT_ROTATION_ANCHOR; static final double DEFAULT_ROTATION_ANGLE; }### Answer:
@Test public void testSetRotationAnchor() { TextAnnotation a = new CategoryTextAnnotation("Test", "Category", 1.0); try { a.setRotationAnchor(null); fail("Should have thrown Exception."); } catch (IllegalArgumentException e) { assertEquals("Null 'anchor' argument.", e.getMessage()); } }