@Test
public void testLargeAllocation() {

    List<AgentInstanceGroup> instanceGroups = asList(
            getInstanceGroup(Tier.Critical, M4_XLARGE_ID, 0, 10),
            getInstanceGroup(Tier.Critical, M4_4XLARGE_ID, 0, 0),
            getInstanceGroup(Tier.Flex, R4_8XLARGE_ID, 0, 0),
            getInstanceGroup(Tier.Flex, P2_8XLARGE_ID, 0, 0)
    );
    when(agentManagementService.getInstanceGroups()).thenReturn(instanceGroups);
    ApplicationSLA largeSLA = ApplicationSlaSample.CriticalLarge.builder().withInstanceCount(10).build(); // 2 * 10 CPUs
    CapacityRequirements requirements = new CapacityRequirements(singletonMap(Tier.Critical, singletonList(largeSLA)));
    CapacityAllocations allocations = strategy.compute(requirements);
    allocations.getInstanceGroups().forEach(instanceGroup -> {
        assertThat(instanceGroup.getTier()).isEqualTo(Tier.Critical);
    });
    AgentInstanceGroup m4xlInstanceGroup = findInstanceGroupByInstanceType(allocations.getInstanceGroups(), M4_XLARGE_ID);
    assertThat(allocations.getExpectedMinSize(m4xlInstanceGroup)).isEqualTo(6);
    AgentInstanceGroup m44xlInstanceGroup = findInstanceGroupByInstanceType(allocations.getInstanceGroups(), M4_4XLARGE_ID);
    assertThat(allocations.getExpectedMinSize(m44xlInstanceGroup)).isEqualTo(0);
}