@Test public void shouldReturnDefaultIconWhenBundleDoesNotContainIcon() { setupBundleRetrieval(); BundleIcon bundleIcon = bundleIconService.getBundleIconById(BUNDLE_ID, null); byte[] expectedIcon = readDefaultIcon(DEFAULT_PATH + DEFAULT_ICON); assertArrayEquals(expectedIcon, bundleIcon.getIcon()); assertEquals(expectedIcon.length, bundleIcon.getContentLength()); assertEquals(ICON_MIME, bundleIcon.getMime()); for (String iconName : BundleIcon.ICON_LOCATIONS) { verify(bundle).getResource(iconName); } }
@Override public BundleIcon getBundleIconById(long bundleId, String defaultIcon) { Bundle bundle = getBundleById(bundleId); return getBundleIcon(bundle, defaultIcon); }
BundleIconServiceImpl implements BundleIconService { @Override public BundleIcon getBundleIconById(long bundleId, String defaultIcon) { Bundle bundle = getBundleById(bundleId); return getBundleIcon(bundle, defaultIcon); } }
BundleIconServiceImpl implements BundleIconService { @Override public BundleIcon getBundleIconById(long bundleId, String defaultIcon) { Bundle bundle = getBundleById(bundleId); return getBundleIcon(bundle, defaultIcon); }  }
BundleIconServiceImpl implements BundleIconService { @Override public BundleIcon getBundleIconById(long bundleId, String defaultIcon) { Bundle bundle = getBundleById(bundleId); return getBundleIcon(bundle, defaultIcon); }  @Override BundleIcon getBundleIconById(long bundleId, String defaultIcon); @Override BundleIcon getBundleIconByName(String bundleName, String defaultIcon); }
BundleIconServiceImpl implements BundleIconService { @Override public BundleIcon getBundleIconById(long bundleId, String defaultIcon) { Bundle bundle = getBundleById(bundleId); return getBundleIcon(bundle, defaultIcon); }  @Override BundleIcon getBundleIconById(long bundleId, String defaultIcon); @Override BundleIcon getBundleIconByName(String bundleName, String defaultIcon);  }