CompoundPainter extends AbstractPainter<T> { public void setPainters(Painter... painters) { Painter[] old = getPainters(); for (Painter p : old) { if (p instanceof AbstractPainter) { ((AbstractPainter<?>) p).removePropertyChangeListener(handler); } } this.painters = new Painter[painters == null ? 0 : painters.length]; if (painters != null) { System.arraycopy(painters, 0, this.painters, 0, this.painters.length); } for (Painter<?> p : this.painters) { if (p instanceof AbstractPainter) { ((AbstractPainter<?>) p).addPropertyChangeListener(handler); } } setDirty(true); firePropertyChange("painters", old, getPainters()); } CompoundPainter();  CompoundPainter(Painter... painters); void setPainters(Painter... painters); final Painter[] getPainters(); boolean isClipPreserved(); void setClipPreserved(boolean shouldRestoreState); AffineTransform getTransform(); void setTransform(AffineTransform transform); boolean isCheckingDirtyChildPainters(); void setCheckingDirtyChildPainters(boolean b); @Override void clearCache(); void clearLocalCache();  }
@Test public void testSetNullPainters() { CompoundPainter<Object> painter = new CompoundPainter<Object>(); painter.setPainters((Painter<?>) null); }
@Test public void testSetEmptyPainters() { CompoundPainter<Object> painter = new CompoundPainter<Object>(); painter.setPainters(); painter.setPainters((Painter[]) null); }