### Question:
CardAccountHandler { public boolean areAccountsEqual(Xs2aCardAccountDetails aspspAccount, AccountReference tppAccount) { String aspspMaskedPan = aspspAccount.getMaskedPan(); return isMaskedPanCorrespondsToValue(aspspMaskedPan, tppAccount.getMaskedPan()) || isMaskedPanCorrespondsToValue(aspspMaskedPan, tppAccount.getPan()); }  boolean areAccountsEqual(Xs2aCardAccountDetails aspspAccount, AccountReference tppAccount); String hidePanInAccountReference(String pan);  }### Answer:
@Test void areAccountsEqual_2_maskedPans() { boolean actual = cardAccountHandler.areAccountsEqual(getXs2aCardAccountDetails(), getAccountReference(AccountReferenceType.MASKED_PAN, MASKED_PAN)); assertTrue(actual); }
@Test void areAccountsEqual_maskedPan_and_pan() { boolean actual = cardAccountHandler.areAccountsEqual(getXs2aCardAccountDetails(), getAccountReference(AccountReferenceType.PAN, PAN)); assertTrue(actual); }
@Test void areAccountsEqual_2_maskedPans_wrong() { boolean actual = cardAccountHandler.areAccountsEqual(getXs2aCardAccountDetails(), getAccountReference(AccountReferenceType.MASKED_PAN, WRONG_MASKED_PAN)); assertFalse(actual); }
@Test void areAccountsEqual_maskedPan_and_pan_wrong() { boolean actual = cardAccountHandler.areAccountsEqual(getXs2aCardAccountDetails(), getAccountReference(AccountReferenceType.PAN, WRONG_PAN)); assertFalse(actual); }