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