@Test
public void testPathSpecific() {

    // decode escaped characters
    Assert.assertEquals("/foo bar/", new QueryStringDecoder("/foo%20bar/?").path());
    Assert.assertEquals("/foo\r\n\\bar/", new QueryStringDecoder("/foo%0D%0A\\bar/?").path());
    // a 'fragment' after '#' should be cuted (see RFC 3986)
    Assert.assertEquals("", new QueryStringDecoder("#123").path());
    Assert.assertEquals("foo", new QueryStringDecoder("foo?bar#anchor").path());
    Assert.assertEquals("/foo-bar", new QueryStringDecoder("/foo-bar#anchor").path());
    Assert.assertEquals("/foo-bar", new QueryStringDecoder("/foo-bar#a#b?c=d").path());
    // '+' is not escape ' ' for the path
    Assert.assertEquals("+", new QueryStringDecoder("+").path());
    Assert.assertEquals("/foo+bar/", new QueryStringDecoder("/foo+bar/?").path());
    Assert.assertEquals("/foo++", new QueryStringDecoder("/foo++?index.php").path());
    Assert.assertEquals("/foo +", new QueryStringDecoder("/foo%20+?index.php").path());
    Assert.assertEquals("/foo+ ", new QueryStringDecoder("/foo+%20").path());
}