@Test
public void testUpdateDemand() {

  AppSchedulable app = mock(AppSchedulable.class);
  Mockito.when(app.getDemand()).thenReturn(maxResource);
  schedulable.addAppSchedulable(app);
  schedulable.addAppSchedulable(app);
  schedulable.updateDemand();
  assertTrue("Demand is greater than max allowed ",
      Resources.equals(schedulable.getDemand(), maxResource));
}