### Question:
AdorsysAccountInformationService extends BaseAccountInformationService { @Override protected Map<String, String> populateDeleteHeaders(Map<String, String> headers) { return super.populateDeleteHeaders(modifyAcceptHeader(headers)); } AdorsysAccountInformationService(Aspsp aspsp,
                                            HttpClient httpClient,
                                            List<Interceptor> interceptors,
                                            LinksRewriter linksRewriter); @Override Response<ConsentsResponse201> createConsent(RequestHeaders requestHeaders,
                                                       RequestParams requestParams,
                                                       Consents body);  }### Answer:
@Test void populateDeleteHeaders_withoutAcceptHeader() { Map<String, String> actual = accountInformationService.populateDeleteHeaders(new HashMap<>()); assertThat(actual).containsEntry(RequestHeaders.ACCEPT, ACCEPT_JSON); }
@Test void populateDeleteHeaders_acceptAll() { HashMap<String, String> headers = new HashMap<>(); headers.put(RequestHeaders.ACCEPT, ACCEPT_ALL); Map<String, String> actual = accountInformationService.populateDeleteHeaders(headers); assertThat(actual).containsEntry(RequestHeaders.ACCEPT, ACCEPT_JSON); }
@Test void populateDeleteHeaders_acceptJson() { HashMap<String, String> headers = new HashMap<>(); headers.put(RequestHeaders.ACCEPT, ACCEPT_JSON); Map<String, String> actual = accountInformationService.populateDeleteHeaders(headers); assertThat(actual).containsEntry(RequestHeaders.ACCEPT, ACCEPT_JSON); }
@Test void populateDeleteHeaders_acceptXml() { HashMap<String, String> headers = new HashMap<>(); headers.put(RequestHeaders.ACCEPT, ACCEPT_XML); Map<String, String> actual = accountInformationService.populateDeleteHeaders(headers); assertThat(actual).containsEntry(RequestHeaders.ACCEPT, ACCEPT_XML); }