### Question:
DMNGridPanel extends GridLienzoPanel { @Override public void onResize() { doResize(() -> { updatePanelSize(); refreshScrollPosition(); final TransformMediator restriction = mousePanMediator.getTransformMediator(); final Transform transform = restriction.adjust(getDefaultGridLayer().getViewport().getTransform(), getDefaultGridLayer().getVisibleBounds()); getDefaultGridLayer().getViewport().setTransform(transform); getDefaultGridLayer().batch(); }); } DMNGridPanel(final DMNGridLayer gridLayer,
                        final RestrictedMousePanMediator mousePanMediator,
                        final ContextMenuHandler contextMenuHandler); @Override void onResize(); static final int LIENZO_PANEL_WIDTH; static final int LIENZO_PANEL_HEIGHT; }### Answer:
@Test public void testOnResize() { gridPanel.onResize(); verify(gridPanel).updatePanelSize(); verify(gridPanel).refreshScrollPosition(); verify(viewport).setTransform(eq(newTransform)); verify(gridLayer, times(2)).batch(); }