// perform tab key press and wait until it took place
robot.pressAndReleaseKey(KeyEvent.VK_TAB);
robot.waitForIdle();
// perform left key press and wait until it took place
robot.pressAndReleaseKey(KeyEvent.VK_LEFT);
robot.waitForIdle();
// verify that the game registered the left key press and that it didn't
// lose focus
verify(pi).left();