@Test
public void testAddKeyDownHandlerAttachesToEditor() {

    //Ensure nobody thinks its a good idea to attach to the RootPanel at some time in the future!
    //See https://issues.jboss.org/browse/GUVNOR-3146
    final KeyDownHandler handler = mock(KeyDownHandler.class);
    view.addKeyDownHandler(handler);
    verify(rootPanel,
           never()).addDomHandler(eq(handler),
                                  eq(KeyDownEvent.getType()));
    verify(mockGridPanel).addKeyDownHandler(eq(handler));
}