### Question:
FixTimelineReaderAddress extends AbstractUpgradeServerAction { @Override public CommandReport execute(ConcurrentMap<String, Object> requestSharedDataContext) throws AmbariException, InterruptedException { Cluster cluster = getClusters().getCluster(getExecutionCommand().getClusterName()); List<String> updatedHosts = new ArrayList<>(); try { for (String propertyName : HOST_PROPERTIES) { Config config = cluster.getDesiredConfigByType(YARN_SITE); if (config == null) { continue; } String oldHost = config.getProperties().get(propertyName); if (oldHost == null) { continue; } String newHost = replace(oldHost, hostNameOf(cluster, "YARN", TIMELINE_READER), defaultPort(propertyName)); updatedHosts.add(newHost); updateConfig(cluster, propertyName, newHost, config); } return commandReport(String.format("Updated %s hosts to: %s", TIMELINE_READER, join(updatedHosts, ", "))); } catch (ObjectNotFoundException e) { return commandReport("Skipping " + this.getClass().getSimpleName() + ". Reason: " + e.getMessage()); } }  @Override CommandReport execute(ConcurrentMap<String, Object> requestSharedDataContext);  }### Answer:
@Test public void testReplaceTimelineReaderHost() throws Exception { config.updateProperties(new HashMap<String, String>() {{ put("yarn.timeline-service.reader.webapp.address", "newhost:8080"); }}); expectLastCall(); config.updateProperties(new HashMap<String, String>() {{ put("yarn.timeline-service.reader.webapp.https.address", "newhost:8199"); }}); expectLastCall(); replayAll(); action.execute(null); verifyAll(); }