RestrictedMousePanMediator extends AbstractMediator { @Override public void cancel() { m_dragging = false; setCursor(Style.Cursor.DEFAULT); } RestrictedMousePanMediator(final GridLayer gridLayer); protected  RestrictedMousePanMediator(); boolean isDragging(); TransformMediator getTransformMediator(); void setTransformMediator(final TransformMediator transformMediator); @Override void cancel(); @Override boolean handleEvent(final GwtEvent<?> event);  }
@Test public void testCancel() throws Exception { final Viewport viewport = mock(Viewport.class); final DivElement divElement = mock(DivElement.class); final Style style = mock(Style.class); doReturn(style).when(divElement).getStyle(); doReturn(divElement).when(viewport).getElement(); doReturn(viewport).when(mediator).getLayerViewport(); mediator.cancel(); verify(style).setCursor(Style.Cursor.DEFAULT); }