### Question:
WebServiceResourceInfo extends BaseResourceInfo { @JsonIgnore public void addHeader( String name, Object value ) { Object headers = getAttributes().get( "headers" ); if ( headers == null ) { headers = new HashMap<String, Object>(); getAttributes().put( "headers", headers ); } if ( headers instanceof Map ) { Map headerMap = (Map) headers; headerMap.put( name, value ); } } WebServiceResourceInfo(); @JsonIgnore void setMethod( String method ); @JsonIgnore void setBody( String body ); @JsonIgnore void setApplicationType( String applicationType ); @JsonIgnore void addParameter( String name, Object value ); @JsonIgnore void addHeader( String name, Object value );  }### Answer:
@Test public void testAddHeader() throws Exception { resourceInfo.addHeader( "header1", "value1" ); Map headers = (Map) resourceInfo.getAttributes().get( "headers" ); assertNotNull( headers ); assertEquals( headers.get( "header1" ), "value1" ); resourceInfo.addHeader( "header2", "value2" ); headers = (Map) resourceInfo.getAttributes().get( "headers" ); assertNotNull( headers ); assertEquals( headers.get( "header2" ), "value2" ); }