@Test
  public void testGetContainerByNameBothSuccess() throws AccountServiceException {
    Container testContainer = testAccount.getAllContainers().iterator().next();
    when(primaryAccountService.getContainerByName(any(), any())).thenReturn(testContainer);
    when(secondaryAccountService.getContainerByName(any(), any())).thenReturn(testContainer);
    assertEquals("Unexpected response", testContainer,
        compositeAccountService.getContainerByName(testAccount.getName(), testContainer.getName()));
    verify(primaryAccountService).getContainerByName(testAccount.getName(), testContainer.getName());
    verify(secondaryAccountService).getContainerByName(testAccount.getName(), testContainer.getName());
    assertEquals("Expected zero inconsistency", 0, metrics.getAccountInconsistencyCount.getCount());
  }
Test composite getContainer(accountName, containerName) with both sources returning the same result.
ambry-account/src/test/java/com/github/ambry/account/CompositeAccountServiceTest.java