@Test
public void testResourceShortageReporting() {

    List<AgentInstanceGroup> instanceGroups = singletonList(
            getInstanceGroup(Tier.Critical, M4_XLARGE_ID, 0, 2)
    );
    when(agentManagementService.getInstanceGroups()).thenReturn(instanceGroups);
    ApplicationSLA veryBigSLA = ApplicationSlaSample.CriticalSmall.builder().withInstanceCount(100).build();
    CapacityRequirements requirements = new CapacityRequirements(singletonMap(Tier.Critical, singletonList(veryBigSLA)));
    CapacityAllocations allocations = strategy.compute(requirements);
    assertThat(allocations.getTiersWithResourceShortage()).containsExactly(Tier.Critical);
}