/**
* Test that getResource loads based on the servlet config param -
* <init-param>
*/
public void testGetResource_initparam() {
MockServletConfig config = getServletConfig();
MyMockServletContext context = ((MyMockServletContext) config
.getServletContext());
InputStream stream = new ByteArrayInputStream(new byte[] {});
ServletResourceLocator servletLocator = new ServletResourceLocator(
config, null);
config.setInitParameter("paraX", "paraX-config");
context.stream = stream;
context.setInitParameter("paraX", "paraX-context");
try {
InputStream res = servletLocator.getResource("paraX", null);
assertEquals(stream, res);