@Override
  public boolean hasResourcesAvailable(Container container) {
    return hasResourcesAvailable(container.getResource());
  }
@Test
  public void testHasResourcesAvailable() {
    AllocationBasedResourceUtilizationTracker tracker =
        new AllocationBasedResourceUtilizationTracker(mockContainerScheduler);
    Container testContainer = mock(Container.class);
    when(testContainer.getResource()).thenReturn(Resource.newInstance(512, 4));
    for (int i = 0; i < 2; i++) {
      Assert.assertTrue(tracker.hasResourcesAvailable(testContainer));
      tracker.addContainerResources(testContainer);
    }
    Assert.assertFalse(tracker.hasResourcesAvailable(testContainer));
  }