SimpleInputMethodListener listener2 = new SimpleInputMethodListener("2");
SimpleInputMethodListener listener3 = new SimpleInputMethodListener("3");
jtc.addInputMethodListener(listener1);
jtc.addInputMethodListener(listener2);
jtc.addInputMethodListener(listener3);
InputMethodListener listeners[] = jtc.getInputMethodListeners();
assertEquals(listener1, listeners[0]);
assertEquals(listener2, listeners[1]);
assertEquals(listener3, listeners[2]);
assertEquals(3, listeners.length);
}