TextUIWrapper { public final void uninstall(final JTextComponent textComponent) { uiChangeHandler.uninstall(textComponent); textComponent.updateUI(); } protected  TextUIWrapper(Class<UI> wrapperClass); static final TextUIWrapper<? extends PromptTextUI> getDefaultWrapper(); final void install(final JTextComponent textComponent, boolean stayOnUIChange); abstract UI wrapUI(JTextComponent textComponent); Class<UI> getWrapperClass(); final void uninstall(final JTextComponent textComponent);  }
@Test public void testUninstall() { Class<?> defaultUiClass = txt.getUI().getClass(); wrapper.install(txt, true); wrapper.uninstall(txt); assertEquals(defaultUiClass, txt.getUI().getClass()); }