@Test
public void testExcludeFragment() {

    // a 'fragment' after '#' should be cuted (see RFC 3986)
    Assert.assertEquals("a", new QueryStringDecoder("?a#anchor").parameters().keySet().iterator().next());
    Assert.assertEquals("b", new QueryStringDecoder("?a=b#anchor").parameters().get("a").get(0));
    Assert.assertTrue(new QueryStringDecoder("?#").parameters().isEmpty());
    Assert.assertTrue(new QueryStringDecoder("?#anchor").parameters().isEmpty());
    Assert.assertTrue(new QueryStringDecoder("#?a=b#anchor").parameters().isEmpty());
    Assert.assertTrue(new QueryStringDecoder("?#a=b#anchor").parameters().isEmpty());
}