public void portsTextTraversesOnTab() throws Exception {
KeyEvent e = initPortsTextListener();
e.keyCode = SWT.TAB;
Shell shell = mock(Shell.class);
when(((Control)e.getSource()).getShell()).thenReturn(shell);
when(shell.traverse(SWT.TRAVERSE_TAB_NEXT)).thenReturn(true);
portsTextListener.keyPressed(e);
assertFalse(e.doit);
}