### Question:
DefaultUpdateService implements UpdateService { @Override public String getLatestVersion() { try { if (jsonSource instanceof URL) { return JSON.std.mapFrom(urlToStream((URL) jsonSource)).getOrDefault(CURRENT_VERSION_KEY, "").toString(); } return JSON.std.mapFrom(jsonSource).getOrDefault(CURRENT_VERSION_KEY, "").toString(); } catch (IOException e) { LOG.warn(DefaultI18nContext.getInstance().i18n("Unable to find the latest available version."), e); } return EMPTY; } @Inject  DefaultUpdateService(@Named("updatesUrl") Object jsonSource); @Override String getLatestVersion();  }### Answer:
@Test public void pasitiveCheckForUpdates() { DefaultUpdateService victim = new DefaultUpdateService("{\"currentVersion\" : \"3.0.0\"}"); assertEquals("3.0.0", victim.getLatestVersion()); }
@Test public void negativeCheckForUpdates() { DefaultUpdateService victim = new DefaultUpdateService("ChuckNorris"); assertEquals("", victim.getLatestVersion()); }