}
return result;
}
private TestResult checkContextPath(HttpServletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure that included attribute '"
+ KEY_CONTEXT_PATH + "' is available in servlet request.");
result.setSpecPLT("16.3.1");
String expected = (String) request.getAttribute(EXPECTED_CONTEXT_PATH);
String contextPath = (String) request.getAttribute(KEY_CONTEXT_PATH);
if (contextPath != null && contextPath.equals(expected)) {
result.setReturnCode(TestResult.PASSED);
} else {
TestUtils.failOnAssertion(KEY_CONTEXT_PATH,
contextPath, expected, result);
}
return result;