### Question:
DefaultPremiumModulesService implements PremiumModulesService { @Override public List<PremiumModule> getPremiumModules() { try { return JSON.std.with(Feature.READ_ONLY, true).listOfFrom(PremiumModule.class, urlToStream(new URL(pdfsam.property(ConfigurableProperty.PREMIUM_MODULES_URL)))); } catch (IOException e) { LOG.warn(DefaultI18nContext.getInstance().i18n("Unable to retrieve premium features description"), e); } return Collections.emptyList(); } @Inject  DefaultPremiumModulesService(Pdfsam pdfsam); @Override List<PremiumModule> getPremiumModules();  }### Answer:
@Test public void testGetLatestNews() throws Exception { File file = folder.newFile(); FileUtils.copyInputStreamToFile(getClass().getResourceAsStream("/test_premium_modules.json"), file); when(pdfsam.property(ConfigurableProperty.PREMIUM_MODULES_URL)).thenReturn(file.toURI().toString()); List<PremiumModule> modules = victim.getPremiumModules(); assertEquals(1, modules.size()); assertEquals("module-name", modules.get(0).getName()); assertEquals("module-description", modules.get(0).getDescription()); assertEquals(1, modules.get(0).getId()); assertEquals(PremiumProduct.VISUAL, modules.get(0).getProduct()); assertEquals("http: }