@Test
  public void testGetAccountByNameResultsDifferent() {
    when(primaryAccountService.getAccountByName(any())).thenReturn(testAccount);
    when(secondaryAccountService.getAccountByName(any())).thenReturn(
        new AccountBuilder(testAccount).status(Account.AccountStatus.INACTIVE).build());
    assertEquals("Expected response from primary", testAccount,
        compositeAccountService.getAccountByName(testAccount.getName()));
    verify(primaryAccountService).getAccountByName(testAccount.getName());
    verify(secondaryAccountService).getAccountByName(testAccount.getName());
    assertEquals("Expected one inconsistency", 1, metrics.getAccountInconsistencyCount.getCount());
  }
Test composite getAccountByName() with both sources returning different results.
ambry-account/src/test/java/com/github/ambry/account/CompositeAccountServiceTest.java