### Question:
LienzoPictureUtils { public static void tryDestroy(final Picture picture, final Consumer<Picture> retryCallback) { if (!retryDestroy(picture)) { retryCallback.accept(picture); } }  static void forceLoad(final Picture picture,
                                 final String data,
                                 final Command loadCallback); static void tryDestroy(final Picture picture,
                                  final Consumer<Picture> retryCallback); static boolean retryDestroy(final Picture picture);  }### Answer:
@Test public void checkDestructionRemovesResourcesFromDOMWhenPictureIsLoaded() { when(picture.isLoaded()).thenReturn(true); LienzoPictureUtils.tryDestroy(picture, LienzoPictureUtils::retryDestroy); verify(picture).removeFromParent(); verify(imageElement).removeFromParent(); }