assertEquals( "forward:~/test/path", ctx.path( "forward:~/test/path" ) );
}
@Test
public void redirectMethod() {
PrefixingPathContext ctx = new PrefixingPathContext( "/boe" );
assertEquals( "redirect:/boe/test/path", ctx.redirect( "test/path" ) );
assertEquals( "redirect:/boe/test/path", ctx.redirect( "/test/path" ) );
assertEquals( "redirect:http://www.google.be", ctx.redirect( "http://www.google.be" ) );
assertEquals( "redirect:~/test/path", ctx.redirect( "~/test/path" ) );
assertEquals( "redirect:/boe/test/path", ctx.redirect( "redirect:test/path" ) );
assertEquals( "redirect:/boe/test/path", ctx.redirect( "redirect:/test/path" ) );
assertEquals( "redirect:http://www.google.be", ctx.redirect( "redirect:http://www.google.be" ) );
assertEquals( "redirect:~/test/path", ctx.redirect( "redirect:~/test/path" ) );
// Instead of modifying the forward, assume it's what the user want
assertEquals( "redirect:forward:/boe/test/path", ctx.redirect( "forward:test/path" ) );
assertEquals( "redirect:forward:/boe/test/path", ctx.redirect( "forward:/test/path" ) );
assertEquals( "redirect:forward:http://www.google.be", ctx.redirect( "forward:http://www.google.be" ) );
assertEquals( "redirect:forward:~/test/path", ctx.redirect( "forward:~/test/path" ) );
}