@Test public void testGetMinimumCapacityInInterval() { long[] timeSteps = { 0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L }; int[] alloc = { 2, 5, 7, 10, 3, 4, 0, 8 }; RLESparseResourceAllocation rleSparseVector = ReservationSystemTestUtil .generateRLESparseResourceAllocation(alloc, timeSteps); LOG.info(rleSparseVector.toString()); Assert.assertEquals(rleSparseVector.getMinimumCapacityInInterval( new ReservationInterval(1L, 3L)), Resource.newInstance(5, 5)); Assert.assertEquals(rleSparseVector.getMinimumCapacityInInterval( new ReservationInterval(2L, 5L)), Resource.newInstance(3, 3)); Assert.assertEquals(rleSparseVector.getMinimumCapacityInInterval( new ReservationInterval(1L, 7L)), Resource.newInstance(0, 0)); }