*/
public class MappedShortcutManagerTest extends TestCase {
ShortcutManager shortcutManager;
private KeyboardEvent expectKeyboard(int modifiers, int keyCode, int charCode) {
KeyboardEvent keyEvent = EasyMock.createMock(KeyboardEvent.class);
EasyMock.expect(keyEvent.getKeyCode()).andReturn(keyCode).anyTimes();
EasyMock.expect(keyEvent.getCharCode()).andReturn(charCode).anyTimes();
EasyMock.expect(keyEvent.isAltKey()).andReturn(
(modifiers & ModifierKeys.ALT) == ModifierKeys.ALT).anyTimes();
EasyMock.expect(keyEvent.isCtrlKey()).andReturn(
(modifiers & ModifierKeys.ACTION) == ModifierKeys.ACTION).anyTimes();
EasyMock.expect(keyEvent.isMetaKey()).andReturn(
(modifiers & ModifierKeys.ACTION) == ModifierKeys.ACTION).anyTimes();
EasyMock.expect(keyEvent.isShiftKey()).andReturn(
(modifiers & ModifierKeys.SHIFT) == ModifierKeys.SHIFT).anyTimes();
EasyMock.replay(keyEvent);
return keyEvent;
}