@Test
  public void testGetContainerByStatusBothSuccess() {
    Set<Container> activeContainers = new HashSet<>(Collections.singletonList(testContainer));
    when(primaryAccountService.getContainersByStatus(Container.ContainerStatus.ACTIVE)).thenReturn(activeContainers);
    when(secondaryAccountService.getContainersByStatus(Container.ContainerStatus.ACTIVE)).thenReturn(activeContainers);
    assertEquals("Unexpected response", activeContainers,
        compositeAccountService.getContainersByStatus(Container.ContainerStatus.ACTIVE));
    verify(primaryAccountService).getContainersByStatus(Container.ContainerStatus.ACTIVE);
    verify(secondaryAccountService).getContainersByStatus(Container.ContainerStatus.ACTIVE);
  }
Test composite getContainersByStatus() with both sources returning the same result.
ambry-account/src/test/java/com/github/ambry/account/CompositeAccountServiceTest.java