config.setAll( new HttpMethodConfiguration() );
TestWagon wagon = new TestWagon();
wagon.setHttpConfiguration( config );
HttpHead method = new HttpHead();
wagon.setHeaders( method );
// these are the default headers.
// method.addRequestHeader( "Cache-control", "no-cache" );
// method.addRequestHeader( "Cache-store", "no-store" );
// method.addRequestHeader( "Pragma", "no-cache" );
// method.addRequestHeader( "Expires", "0" );
// method.addRequestHeader( "Accept-Encoding", "gzip" );
Header header = method.getFirstHeader( "Cache-control" );
assertNotNull( header );
assertEquals( "no-cache", header.getValue() );
header = method.getFirstHeader( "Cache-store" );
assertNotNull( header );
assertEquals( "no-store", header.getValue() );
header = method.getFirstHeader( "Pragma" );
assertNotNull( header );
assertEquals( "no-cache", header.getValue() );
header = method.getFirstHeader( "Expires" );
assertNotNull( header );
assertEquals( "0", header.getValue() );
header = method.getFirstHeader( "Accept-Encoding" );
assertNotNull( header );
assertEquals( "gzip", header.getValue() );
}