mockHttpServletRequest.expectAndReturn("getServerPort", 9090);
Mock mockHttpServletResponse = new Mock(HttpServletResponse.class);
mockHttpServletResponse.expectAndReturn("encodeURL", expectedUrl, expectedUrl);
String result = urlHelper.buildUrl("/path1/path2/myAction.action", (HttpServletRequest) mockHttpServletRequest.proxy(), (HttpServletResponse) mockHttpServletResponse.proxy(), null, "http", true, true, true);
assertEquals(expectedUrl, result);
mockHttpServletRequest.verify();
}
public void testBuildParametersStringWithUrlHavingSomeExistingParameters() throws Exception {