@Test public void testDestroy() { tested.destroy(); LienzoPanelFocusHandler focusHandler = mock(LienzoPanelFocusHandler.class); tested.focusHandler = focusHandler; tested.destroy(); verify(focusHandler, times(1)).clear(); assertNull(tested.focusHandler); }
@PreDestroy public void destroy() { if (null != focusHandler) { focusHandler.clear(); focusHandler = null; } }
LienzoPanelMediators { @PreDestroy public void destroy() { if (null != focusHandler) { focusHandler.clear(); focusHandler = null; } } }
LienzoPanelMediators { @PreDestroy public void destroy() { if (null != focusHandler) { focusHandler.clear(); focusHandler = null; } } @Inject  LienzoPanelMediators(final LienzoCanvasMediators mediators,
                                final ZoomLevelSelectorPresenter selector); }
LienzoPanelMediators { @PreDestroy public void destroy() { if (null != focusHandler) { focusHandler.clear(); focusHandler = null; } } @Inject  LienzoPanelMediators(final LienzoCanvasMediators mediators,
                                final ZoomLevelSelectorPresenter selector); LienzoPanelMediators init(final Supplier<LienzoCanvas> canvas); LienzoPanelMediators setMinScale(final double minScale); LienzoPanelMediators setMaxScale(final double maxScale); LienzoPanelMediators setZoomFactor(final double factor); void enable(); void disable(); @PreDestroy void destroy(); }
LienzoPanelMediators { @PreDestroy public void destroy() { if (null != focusHandler) { focusHandler.clear(); focusHandler = null; } } @Inject  LienzoPanelMediators(final LienzoCanvasMediators mediators,
                                final ZoomLevelSelectorPresenter selector); LienzoPanelMediators init(final Supplier<LienzoCanvas> canvas); LienzoPanelMediators setMinScale(final double minScale); LienzoPanelMediators setMaxScale(final double maxScale); LienzoPanelMediators setZoomFactor(final double factor); void enable(); void disable(); @PreDestroy void destroy();  }