@Test
@Category(Visual.class)
public void testNonStrictCompletionWithKeyMovement() {

    assumeThat(GraphicsEnvironment.isHeadless(), is(false));
    
    combo.setEditable(true);
    AutoCompleteDecorator.decorate(combo);
    combo.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            if ("".equals(combo.getSelectedItem())) {
                fail("received illegal value");
            }
        }
    });
    
    JFrame frame = new JFrame();
    frame.add(combo);
    frame.pack();
    frame.setVisible(true);
    
    assertThat((String) combo.getSelectedItem(), is("Alpha"));
    assumeThat(combo.isPopupVisible(), is(false));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_DOWN, CHAR_UNDEFINED));
    assertThat(combo.isPopupVisible(), is(true));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_DOWN, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Bravo"));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_PAGE_DOWN, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Delta"));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_UP, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Charlie"));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_PAGE_UP, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Alpha"));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_END, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Delta"));
    
    combo.processKeyEvent(new KeyEvent(combo, KEY_PRESSED, currentTimeMillis(), 0, VK_HOME, CHAR_UNDEFINED));
    assertThat((String) combo.getSelectedItem(), is("Alpha"));
}