### Question:
RedirectConsentServiceImpl implements RedirectConsentService { @Override public void updateAccessByConsentType(ConsentWorkflow workflow, List<AccountDetailsTO> listOfAccounts) { AisConsentRequestType consentType = workflow.getConsentResponse().getAccountConsent().getAisConsentRequestType(); if (!EnumSet.of(BANK_OFFERED, DEDICATED_ACCOUNTS).contains(consentType)) { AisAccountAccessInfoTO authAccountAccess = workflow.getAuthResponse().getConsent().getAccess(); List<String> ibans = extractUserIbans(listOfAccounts); authAccountAccess.setAccounts(ibans); if (ALL_AVAILABLE_ACCOUNTS == consentType && requestedConsentWithBalance(workflow)) { authAccountAccess.setBalances(ibans); } if (GLOBAL == consentType) { authAccountAccess.setBalances(ibans); authAccountAccess.setTransactions(ibans); } } if (DEDICATED_ACCOUNTS == consentType) { Set<String> ibans = new HashSet<>(extractUserIbans(listOfAccounts)); Set<String> ibansFromAccess = extractIbansFromAccess(workflow.getConsentResponse().getAccountConsent().getAccess()); checkAccess(ibansFromAccess, ibans); } }  @Override void selectScaMethod(String scaMethodId, final ConsentWorkflow workflow); @Override void updateAccessByConsentType(ConsentWorkflow workflow, List<AccountDetailsTO> listOfAccounts); @Override void updateScaStatusConsentStatusConsentData(String psuId, ConsentWorkflow workflow); @Override void startConsent(final ConsentWorkflow workflow, AisConsentTO aisConsent, List<AccountDetailsTO> listOfAccounts); @Override ConsentWorkflow identifyConsent(String encryptedConsentId, String authorizationId, boolean strict, String consentCookieString, BearerTokenTO bearerToken);  }### Answer:
@Test void updateAccessByConsentType_globalConsent() { assertThatCode(() -> redirectConsentService.updateAccessByConsentType(getConsentWorkflow(AisConsentRequestType.GLOBAL, IBAN_DE), Collections.singletonList(getAccountDetails()))).doesNotThrowAnyException(); }
@Test void updateAccessByConsentType_allAvailableAccountsConsent() { assertThatCode(() -> redirectConsentService.updateAccessByConsentType(getConsentWorkflow(AisConsentRequestType.ALL_AVAILABLE_ACCOUNTS, IBAN_DE), Collections.singletonList(getAccountDetails()))).doesNotThrowAnyException(); }
@Test void updateAccessByConsentType_dedicatedAccountsConsent() { assertThatCode(() -> redirectConsentService.updateAccessByConsentType(getConsentWorkflow(AisConsentRequestType.DEDICATED_ACCOUNTS, IBAN_DE), Collections.singletonList(getAccountDetails()))).doesNotThrowAnyException(); }
@Test void updateAccessByConsentType_loginFailed() { assertThrows(AuthorizationException.class, () -> redirectConsentService.updateAccessByConsentType(getConsentWorkflow(AisConsentRequestType.DEDICATED_ACCOUNTS, IBAN_FR), Collections.singletonList(getAccountDetails()))); }