### Question:
ContentTypeHeaderValidatorImpl extends AbstractHeaderValidatorImpl implements ConsentHeaderValidator, PaymentHeaderValidator { @Override protected String getHeaderName() { return HttpHeaders.CONTENT_TYPE; } @Autowired  ContentTypeHeaderValidatorImpl(ErrorBuildingService errorBuildingService);   }### Answer:
@Test void validate_success() { headers.put(validator.getHeaderName(), ContentType.JSON.getType()); validator.validate(headers, messageError); assertTrue(messageError.getTppMessages().isEmpty()); }
@Test void validate_nullHeaderError() { headers.put(validator.getHeaderName(), null); validator.validate(headers, messageError); assertEquals(MessageErrorCode.FORMAT_ERROR_NULL_HEADER, messageError.getTppMessage().getMessageErrorCode()); assertArrayEquals(CONTENT_TYPE_HEADER_NAME, messageError.getTppMessage().getTextParameters()); }
@Test void validate_blankHeaderError() { headers.put(validator.getHeaderName(), ""); validator.validate(headers, messageError); assertEquals(MessageErrorCode.FORMAT_ERROR_BLANK_HEADER, messageError.getTppMessage().getMessageErrorCode()); assertArrayEquals(CONTENT_TYPE_HEADER_NAME, messageError.getTppMessage().getTextParameters()); }