@Test public void testDefaultTomatoIcon() { Image defaultIcon = mock(Image.class); when(resources.image(resourceName(TrayIcons.DEFAULT_ICON_SIZE))).thenReturn(defaultIcon); Image icon = trayIcons.tomato(); assertThat(icon, equalTo(defaultIcon)); }
public Image tomato() { int size = tray.iconSize().height; Image image = tomato(size); if (image == null) { image = tomato(DEFAULT_ICON_SIZE); } return image; }
TrayIcons { public Image tomato() { int size = tray.iconSize().height; Image image = tomato(size); if (image == null) { image = tomato(DEFAULT_ICON_SIZE); } return image; } }
TrayIcons { public Image tomato() { int size = tray.iconSize().height; Image image = tomato(size); if (image == null) { image = tomato(DEFAULT_ICON_SIZE); } return image; }  }
TrayIcons { public Image tomato() { int size = tray.iconSize().height; Image image = tomato(size); if (image == null) { image = tomato(DEFAULT_ICON_SIZE); } return image; }  @Inject void setResources(Resources resources); @Inject void setTray(Tray tray); @Inject void setLook(Look look); @Inject void setCaches(Caches caches); Image tomato(); Image time(Time time); }
TrayIcons { public Image tomato() { int size = tray.iconSize().height; Image image = tomato(size); if (image == null) { image = tomato(DEFAULT_ICON_SIZE); } return image; }  @Inject void setResources(Resources resources); @Inject void setTray(Tray tray); @Inject void setLook(Look look); @Inject void setCaches(Caches caches); Image tomato(); Image time(Time time); static final int DEFAULT_ICON_SIZE; }