### Question:
HttpHeaderUtils { public static boolean isValidHttpHeaderName( String name ) { if ( name == null || name.length() == 0 ) { return false; } boolean isBlank = true; for ( int i = 0; i < name.length(); i++ ) { char c = name.charAt( i ); if ( Character.isISOControl( c ) ) { return false; } if ( !Character.isWhitespace( c ) ) { isBlank = false; } } return !isBlank; } private  HttpHeaderUtils(); static MediaType mediaTypeWithCharsetUtf8( String mediaType ); static MediaType mediaTypeWithCharsetUtf8( MediaType mediaType ); static long getTransactionTimeout( HttpServletRequest request, Log errorLog ); static boolean isValidHttpHeaderName( String name ); static final String MAX_EXECUTION_TIME_HEADER; static final Map<String,String> CHARSET; }### Answer:
@Test public void shouldCheckHttpHeaders() { assertFalse( isValidHttpHeaderName( null ) ); assertFalse( isValidHttpHeaderName( "" ) ); assertFalse( isValidHttpHeaderName( " " ) ); assertFalse( isValidHttpHeaderName( " " ) ); assertFalse( isValidHttpHeaderName( " \r " ) ); assertFalse( isValidHttpHeaderName( " \r\n\t " ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.ACCEPT ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.ACCEPT_ENCODING ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.AGE ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.CONTENT_ENCODING ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.EXPIRES ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.IF_MATCH ) ); assertTrue( isValidHttpHeaderName( HttpHeaders.TRANSFER_ENCODING ) ); assertTrue( isValidHttpHeaderName( "Weird Header With Spaces" ) ); assertFalse( isValidHttpHeaderName( "My\nHeader" ) ); assertFalse( isValidHttpHeaderName( "Other\rStrange-Header" ) ); assertFalse( isValidHttpHeaderName( "Header-With-Tab\t" ) ); }