diff --git a/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java b/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
index 99cd4842a..d05aa6d2f 100644
--- a/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
+++ b/core/src/test/java/org/apache/struts2/views/freemarker/FreemarkerResultMockedTest.java
@@ -38,6 +38,11 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import static org.apache.struts2.views.jsp.AbstractUITagTest.normalize;
+import static org.hamcrest.CoreMatchers.allOf;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.startsWith;
+import static org.hamcrest.MatcherAssert.assertThat;
public class FreemarkerResultMockedTest extends StrutsInternalTestCase {
@@ -113,15 +118,12 @@ public class FreemarkerResultMockedTest extends StrutsInternalTestCase {
ActionMapping mapping = container.getInstance(ActionMapper.class).getMapping(request, configurationManager);
dispatcher.serviceAction(request, response, mapping);
- String expected =
- ""
- + ""
- + ""
- + "";
-
String result = stringWriter.toString();
-
- assertEquals(expected, result);
+ assertThat(result, allOf(startsWith(""
+ + "")));
}
public void testManualListInTemplate() throws Exception {