@Test
  public void testGetAccountByNameBothSuccess() {
    when(primaryAccountService.getAccountByName(any())).thenReturn(testAccount);
    when(secondaryAccountService.getAccountByName(any())).thenReturn(testAccount);
    assertEquals("Unexpected response", testAccount, compositeAccountService.getAccountByName(testAccount.getName()));
    verify(primaryAccountService).getAccountByName(testAccount.getName());
    verify(secondaryAccountService).getAccountByName(testAccount.getName());
    assertEquals("Expected zero inconsistency", 0, metrics.getAccountInconsistencyCount.getCount());
  }
Test composite getAccountByName() with both sources returning the same result.
ambry-account/src/test/java/com/github/ambry/account/CompositeAccountServiceTest.java