ItemWidgetImpl extends Composite implements ItemWidget, ClickHandler { @Override public void setImage(@NotNull SVGImage svgImageResource) { svgImage.clear(); svgImage.add(svgImageResource); svgImage.getElement().getStyle().setZIndex(-1); image.setWidget(svgImage); } @Inject  ItemWidgetImpl(RunnerResources resources); @Override void select(); @Override void unSelect(); @Override void setDelegate(@NotNull ActionDelegate delegate); @Override void onClick(ClickEvent event); @Override void setName(@NotNull String name); @Override void setDescription(@Nullable String description); @Override void setStartTime(@NotNull String time); @Override void setImage(@NotNull SVGImage svgImageResource); @Override void setImage(@NotNull ImageResource imageResource); @NotNull @Override SimpleLayoutPanel getImagePanel();  }
@Test public void shouldSetImage() { ImageResource imageResource = mock(ImageResource.class); itemWidget.setImage(imageResource); verify(itemWidget.image).setWidget(any(Image.class)); }
@Test public void shouldSetSVGImage() { SVGImage svgImageResource = mock(SVGImage.class); itemWidget.setImage(svgImageResource); verify(itemWidget.image).setWidget(any(SVGImage.class)); }