@Test(expected=MalformedChallengeException.class)
public void testDigestAuthenticationMD5SessInvalidQop() throws Exception {

    // Example using Digest auth with MD5-sess
    String realm="realm";
    String nonce="e273f1776275974f1a120d8b92c5b3cb";
    String challenge="Digest realm=\"" + realm + "\", "
        + "nonce=\"" + nonce + "\", "
        + "opaque=\"SomeString\", "
        + "stale=false, "
        + "algorithm=MD5-sess, "
        + "qop=\"jakarta\""; // jakarta is an invalid qop value
    Header authChallenge = new BasicHeader(AUTH.WWW_AUTH, challenge);
    AuthScheme authscheme = new DigestScheme();
    authscheme.processChallenge(authChallenge);
}