MockRenderRequest request = new MockRenderRequest(portletContext);
MockPortletPreferences preferences = new MockPortletPreferences();
request.setPreferences(preferences);
request.addLocale(Locale.ENGLISH);
MockRenderResponse response = new MockRenderResponse();
scriptPortlet.render(request, response);
assertFalse("The script is refreshed " +
"(scriptSourceLastEvaluated: " + scriptPortlet.getScriptSourceLastEvaluated() + ", " +
"initial-scriptSourceLastEvaluated: " + scriptSourceLastEvaluated + ")",
scriptPortlet.getScriptSourceLastEvaluated() > scriptSourceLastEvaluated);
String content = response.getContentAsString();
assertNotNull(content);
//System.out.println("### content: " + content);
String greeting = "<H1>" + portletConfig.getResourceBundle(Locale.ENGLISH).getString("javax.portlet.title") + "</H1>";
assertEquals(greeting, content.trim());