@Test
public void testProcessChallengeWithLotsOfBlanks() throws Exception {

    TestAuthScheme authscheme = new TestAuthScheme();
    CharArrayBuffer buffer = new CharArrayBuffer(32);
    buffer.append(" WWW-Authenticate:    Test       realm=\"realm1\"");
    Header header = new BufferedHeader(buffer);
    authscheme.processChallenge(header);
    Assert.assertEquals("test", authscheme.getSchemeName());
    Assert.assertEquals("realm1", authscheme.getParameter("realm"));
}