@Test public void testDestroy() { tested.register(STRIPS, mock(Command.class)); tested.register(STRIPS, mock(Command.class)); assertEquals(1, tested.getRegistered().size()); assertEquals(2, tested.getRegistered().values().iterator().next().intValue()); tested.destroy(); verify(imageStrips, times(1)).remove(STRIP_NAME); assertTrue(tested.getRegistered().isEmpty()); }
@PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); }
LienzoImageStrips { @PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); } }
LienzoImageStrips { @PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); } LienzoImageStrips();   LienzoImageStrips(final ImageStrips imageStrips); }
LienzoImageStrips { @PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); } LienzoImageStrips();   LienzoImageStrips(final ImageStrips imageStrips); void register(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] strips,
                         final Command callback); void remove(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] strips); @PreDestroy void destroy(); }
LienzoImageStrips { @PreDestroy public void destroy() { new HashMap<>(registered).keySet().forEach(this::removeFromLienzo); registered.clear(); } LienzoImageStrips();   LienzoImageStrips(final ImageStrips imageStrips); void register(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] strips,
                         final Command callback); void remove(final org.kie.workbench.common.stunner.core.client.shape.ImageStrip[] strips); @PreDestroy void destroy();  }