@ -98,7 +98,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
@@ -98,7 +98,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
@ -443,11 +443,28 @@ public class MockHttpServletResponse implements HttpServletResponse {
@@ -443,11 +443,28 @@ public class MockHttpServletResponse implements HttpServletResponse {
}
publicvoidsetIncludedUrl(StringincludedUrl){
this.includedUrl=includedUrl;
this.includedUrls.clear();
if(includedUrl!=null){
this.includedUrls.add(includedUrl);
}
}
publicStringgetIncludedUrl(){
returnthis.includedUrl;
intcount=this.includedUrls.size();
if(count>1){
thrownewIllegalStateException(
"More than 1 URL included - check getIncludedUrls instead: "+this.includedUrls);
}
return(count==1?this.includedUrls.get(0):null);
}
publicvoidaddIncludedUrl(StringincludedUrl){
Assert.notNull(includedUrl,"Included URL must not be null");
@ -68,7 +68,7 @@ public class MockRequestDispatcher implements RequestDispatcher {
@@ -68,7 +68,7 @@ public class MockRequestDispatcher implements RequestDispatcher {