@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)); }
@Test public void testTomato() { Image expectedIcon = mock(Image.class); when(resources.image(resourceName(TRAY_ICON_SIZE))).thenReturn(expectedIcon); Image icon = trayIcons.tomato(); assertThat(icon, equalTo(expectedIcon)); }