package org.jdesktop.swingx.plaf;


import java.beans.PropertyChangeEvent;

import javax.swing.JTextField;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

public class AbstractUIChangeHandlerTest {
	JTextField tf = new JTextField();
	AbstractUIChangeHandler ch;
	private boolean changed;
	
	@Before
	public void setUp() throws Exception {
		ch = new AbstractUIChangeHandler(){
			@Override
            public void propertyChange(PropertyChangeEvent evt) {
				changed = true;
			}
		};
	}
	
	@Test
	public void testInstall(){
		ch.install(tf);
		Assert.assertFalse(changed);
		tf.updateUI();
		Assert.assertTrue(changed);
	}
	
	@Test
	public void testUninstall(){
		ch.install(tf);
		ch.uninstall(tf);
		tf.updateUI();
		Assert.assertFalse(changed);
	}
	
	@Test
	public void testDoubleInstall(){
		ch.install(tf);
		ch.install(tf);
		ch.uninstall(tf);
		tf.updateUI();
		Assert.assertFalse(changed);
	}
}

@@ -28,17 +28,16 @@
 .plaf;%0A%0A
-%0A
 import j
@@ -111,23 +111,53 @@
 ort 
-junit.framework
+org.jdesktop.test.EDTRunner;%0Aimport org.junit
 .Ass
@@ -161,17 +161,16 @@
 Assert;%0A
-%0A
 import o
@@ -209,16 +209,75 @@
 t.Test;%0A
+import org.junit.runner.RunWith;%0A%0A@RunWith(EDTRunner.class)
 %0Apublic 

Test clean up.