TextUIWrapper { public abstract UI wrapUI(JTextComponent textComponent); 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 testWrapUI() throws Exception { assertEquals(BuddyTextFieldUI.class, wrapper.wrapUI(new JTextField()).getClass()); assertEquals(PromptTextAreaUI.class, wrapper.wrapUI(new JTextArea()).getClass()); assertEquals(SearchFieldUI.class, wrapper.wrapUI(new JXSearchField()).getClass()); }