// esc should be first as it has no modifiers
Set<Keys> firstShortcutKeys = shortcutList.get(0).getAllKeys();
String firstShortcut = "first shortcut should be Esc with no modifiers";
assertThat(firstShortcut, firstShortcutKeys.size(), is(1));
Keys firstShortcutFirstKeys = firstShortcutKeys.iterator().next();
assertThat(firstShortcut, firstShortcutFirstKeys.getModifiers(), is(0));
assertThat(firstShortcut, firstShortcutFirstKeys.getKeyCode(),
is(KeyCodes.KEY_ESCAPE));
// Alt+X should be next
Set<Keys> secondShortcutKeys = shortcutList.get(1).getAllKeys();
String secondShortcut = "second shortcut should be Alt+X";
assertThat(secondShortcut, secondShortcutKeys.size(), is(1));
Keys secondShortcutFirstKeys = secondShortcutKeys.iterator().next();
assertThat(secondShortcut, secondShortcutFirstKeys.getModifiers(),
is(Keys.ALT_KEY));
assertThat(secondShortcut, secondShortcutFirstKeys.getKeyCode(),
is((int) 'X'));
// Alt+Y should be last
Set<Keys> thirdShortcutKeys = shortcutList.get(2).getAllKeys();
String thirdShortcut = "third shortcut should be Alt+Y";
assertThat(thirdShortcut, thirdShortcutKeys.size(), is(1));
Keys thirdShortcutFirstKeys = thirdShortcutKeys.iterator().next();
assertThat(thirdShortcut, thirdShortcutFirstKeys.getModifiers(),
is(Keys.ALT_KEY));
assertThat(thirdShortcut, thirdShortcutFirstKeys.getKeyCode(),
is((int) 'Y'));
}