package org.chaplib;

import static org.junit.Assert.*;

import org.apache.http.HttpRequest;
import org.apache.http.client.methods.HttpGet;
import org.junit.Before;
import org.junit.Test;

public class TestDefaultUserAgentGenerator {

    private DefaultUserAgentGenerator impl;

    @Before
    public void setUp() {
        impl = new DefaultUserAgentGenerator();
    }
    
    @Test
    public void generatesAUserAgentString() {
        HttpRequest request = new HttpGet("http://www.example.com/");
        impl.setUserAgent(request);
        assertFalse("".equals(request.getFirstHeader("User-Agent").getValue().trim()));
    }
}

@@ -370,16 +370,177 @@
  %7D%0A    %0A
+    /*%0A     * %22User agents SHOULD include this %5BUser-Agent%5D field with requests.%22%0A     * http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43%0A     */%0A
     @Tes

Include RFC2616 quote on unit test for User-Agent.