String expectedURI = "/ctx/foo?bar=encoded";
train_encodeURL(response, expectedURI, expectedURI);
replay();
Link link = new LinkImpl("/ctx/foo", false, LinkSecurity.INSECURE, response, encoder, null);
assertSame(link.addParameterValue("bar", "plain"), link);
assertEquals(link.toURI(), expectedURI);
verify();
}