### Question:
Xs2aHttpLogSanitizer { public String sanitizeHeader(String name, String value) { if (sanitizedHeaders.contains(name)) { return REPLACEMENT; } return sanitize(value); } Xs2aHttpLogSanitizer(); String sanitizeHeader(String name, String value); String sanitize(String data); String sanitizeRequestBody(HttpEntity entity, String contentType); String sanitizeResponseBody(Object responseBody, String contentType);  }### Answer:
@Test void sanitizeSensitiveHeaders() { List<String> headers = Arrays.asList("Authorization", "PSU-ID", "PSU-Corporate-ID", "Consent-ID", "X-GTW-IBAN", "Location"); for (String header : headers) { String sanitizedHeader = anonymizer.sanitizeHeader(header, "1234567"); assertThat(sanitizedHeader).isEqualTo(REPLACEMENT); } }
@Test void sanitizeGeneralHeader() { List<String> headers = Arrays.asList("Content-type", "Accept", "Correlation-ID"); for (String header : headers) { String sanitizedHeader = anonymizer.sanitizeHeader(header, "1234567"); assertThat(sanitizedHeader).isEqualTo("1234567"); } }