{
harness.checkPoint("MetalComboBoxButton(JComboBox, Icon, CellRendererPane, JList)");
JComboBox jcb = new JComboBox(new Object[] {"A", "B", "C"});
Icon icon = new MetalComboBoxIcon();
MetalComboBoxButton b = new MetalComboBoxButton(jcb, icon,
new CellRendererPane(), new JList());
harness.check(b.getComboBox() == jcb);
harness.check(b.getComboIcon() == icon);
harness.check(!b.isIconOnly());
Insets margin = b.getMargin();
harness.check(margin, new Insets(2, 14, 2, 14));
harness.check(margin instanceof UIResource);
Insets insets = b.getInsets();
harness.check(insets, new Insets(5, 17, 5, 17));
boolean pass = false;
try
{
b = new MetalComboBoxButton(null, icon, new CellRendererPane(),
new JList());
}
catch (NullPointerException e)
{
pass = true;
}
harness.check(pass);
b = new MetalComboBoxButton(jcb, null, new CellRendererPane(), new JList());
harness.check(b.getComboIcon() == null);
b = new MetalComboBoxButton(jcb, icon, null, new JList());
b = new MetalComboBoxButton(jcb, icon, new CellRendererPane(), null);
}