private HashMap<String, String> addAppContainers(Application app) { Dispatcher dispatcher = new AsyncDispatcher(); ApplicationAttemptId appAttemptId = BuilderUtils.newApplicationAttemptId(app.getAppId(), 1); Container container1 = new MockContainer(appAttemptId, dispatcher, conf, app.getUser(), app.getAppId(), 1); Container container2 = new MockContainer(appAttemptId, dispatcher, conf, app.getUser(), app.getAppId(), 2); nmContext.getContainers().put(container1.getContainerID(), container1); nmContext.getContainers().put(container2.getContainerID(), container2); app.getContainers().put(container1.getContainerID(), container1); app.getContainers().put(container2.getContainerID(), container2); HashMap<String, String> hash = new HashMap<String, String>(); hash.put(container1.getContainerID().toString(), container1.getContainerID().toString()); hash.put(container2.getContainerID().toString(), container2.getContainerID().toString()); return hash; }