AbstractUIChangeHandler implements PropertyChangeListener { public void install(JComponent c){ if(isInstalled(c)){ return; } c.addPropertyChangeListener("UI", this); installed.put(c, Boolean.FALSE); }  void install(JComponent c); boolean isInstalled(JComponent c); void uninstall(JComponent c);  }
@Test public void testInstall(){ ch.install(tf); Assert.assertFalse(changed); tf.updateUI(); Assert.assertTrue(changed); }