Hello, I've tried to do this:
package com.FOO.madservice.servlet.mock; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import static org.mockito.Mockito.*; @SuppressWarnings("serial") public class BAR2ServletMock extends HttpServlet { ... protected HttpServletRequest requestFilter(HttpServletRequest req) { HttpServletRequest servletRequest = spy(req); doReturn("gzip, deflate").when(servletRequest).getHeader("header-name-goes-here"); doReturn("174.30.216.4").when(servletRequest).getRemoteAddr(); return servletRequest; } ... } I'm trying to mock the data in the HTTPRequest object. On Eclipse using GAE Eclipse pluging 1.3.7, this fails with the following error: java.lang.NoClassDefFoundError: sun.reflect.ReflectionFactory is a restricted class. Please see the Google App Engine developer's guide for more details. Can I disable checking for classes white list on development server? What other mocking alternatives should I examine? Thank you, Maxim. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.