@Test
  public void testGetMaxMemorySomeTasksMissingMetrics() {
    Map<Integer, TonyTaskData> taskDataMap = new TreeMap<>();
    TonyTaskData worker0Data = new TonyTaskData("worker", 0);
    TonyTaskData worker1Data = new TonyTaskData("worker", 1);
    double worker1MaxMemoryBytes = 123d;
    worker1Data.setMetrics(ImmutableList.of(new Metric(Constants.MAX_MEMORY_BYTES, worker1MaxMemoryBytes)));

    taskDataMap.put(0, worker0Data);
    taskDataMap.put(1, worker1Data);

    Assert.assertEquals(worker1MaxMemoryBytes,
        TonyUtils.getMaxMetricForTaskTypeAndMetricName(ImmutableMap.of("worker", taskDataMap), "worker",
            Constants.MAX_MEMORY_BYTES), 0);
  }
Worker 0 is missing metrics, but worker 1 has metrics; we should use worker 1's
max memory metrics.
test/com/linkedin/drelephant/tony/util/TonyUtilsTest.java