@Test
public void testOnlyFenzoPartitionIsScaled() {

    List<AgentInstanceGroup> instanceGroups = Arrays.asList(
            createPartition("fenzoPartition1", InstanceGroupLifecycleState.Active, "r4.16xlarge", 0, 0, 1),
            createPartition("kubeSchedulerPartition", InstanceGroupLifecycleState.Active, "r4.16xlarge", 0, 0, 1),
            createPartition("fenzoPartition2", InstanceGroupLifecycleState.Active, "r4.16xlarge", 0, 0, 1)
    );
    when(agentManagementService.getInstanceGroups()).thenReturn(instanceGroups);
    when(agentManagementService.isOwnedByFenzo(any(AgentInstanceGroup.class))).thenAnswer(invocation -> {
        AgentInstanceGroup instanceGroup = invocation.getArgument(0);
        return instanceGroup.getId().contains("fenzo");
    });
    when(agentManagementService.scaleUp(eq("fenzoPartition1"), anyInt())).thenReturn(Completable.complete());
    when(agentManagementService.scaleUp(eq("fenzoPartition2"), anyInt())).thenReturn(Completable.complete());
    testScheduler.advanceTimeBy(6, TimeUnit.MINUTES);
    ClusterAgentAutoScaler clusterAgentAutoScaler = new ClusterAgentAutoScaler(titusRuntime, configuration,
            agentManagementService, v3JobOperations, schedulingService, testScheduler);
    clusterAgentAutoScaler.doAgentScaling().await();
    verify(agentManagementService).scaleUp("fenzoPartition1", 1);
    verify(agentManagementService, times(0)).scaleUp("kubeSchedulerPartition", 1);
    verify(agentManagementService).scaleUp("fenzoPartition2", 1);
}