@Test
public void testOnlyFenzoPartitionIsIncluded() {

    AgentInstanceGroup fenzoInstanceGroup = createInstanceGroup(0).toBuilder().withId("fenzo").build();
    AgentInstanceGroup kubeSchedulerInstanceGroup = createInstanceGroup(0).toBuilder().withId("kubeScheduler").build();
    when(agentManagementService.getInstanceGroups()).thenReturn(asList(fenzoInstanceGroup, kubeSchedulerInstanceGroup));
    when(agentManagementService.isOwnedByFenzo(any(AgentInstanceGroup.class))).thenAnswer(invocation -> {
        AgentInstanceGroup instanceGroup = invocation.getArgument(0);
        return instanceGroup.getId().equals("fenzo");
    });
    AgentInstance fenzoInstance = createRemovableInstance("fenzo", "agentInstance1");
    AgentInstance kubeSchedulerInstance = createRemovableInstance("kubeScheduler", "agentInstance2");
    when(agentManagementService.getAgentInstances("fenzo")).thenReturn(Collections.singletonList(fenzoInstance));
    when(agentManagementService.getAgentInstances("kubeScheduler")).thenReturn(Collections.singletonList(kubeSchedulerInstance));
    when(agentManagementService.terminateAgents("fenzo", singletonList("agentInstance1"), true))
            .thenReturn(Observable.just(singletonList(Either.ofValue(true))));
    ClusterRemovableAgentRemover clusterRemovableAgentRemover = new ClusterRemovableAgentRemover(titusRuntime, configuration,
            agentManagementService, v3JobOperations, testScheduler);
    clusterRemovableAgentRemover.doRemoveAgents().await();
    verify(agentManagementService).terminateAgents("fenzo", singletonList("agentInstance1"), true);
    verify(agentManagementService, times(0)).terminateAgents("kubeScheduler", singletonList("agentInstance2"), true);
}