{
public void test(TestHarness harness)
{
Button button = new Button();
ComponentEvent event = new ComponentEvent(button,
ComponentEvent.COMPONENT_MOVED);
// Check that previous code produced incorrect string representation.
harness.check(! event.paramString().equalsIgnoreCase(
"COMPONENT_MOVED java.awt.Rectangle[x=0,y=0,width=0,height=0]"));
// Check that current code produces correct string representation.
harness.check(event.paramString(), "COMPONENT_MOVED (0,0 0x0)");
// Check that correct string representation is returned when
// an invalid event ID is given.
event = new ComponentEvent(button, ComponentEvent.COMPONENT_MOVED + 1024);
harness.check(event.paramString(), "unknown type");
}