AbstractRequest implements DispatchRequest { protected void setForceInclude(boolean forceInclude) { getContext(REQUEST_SCOPE).put(FORCE_INCLUDE_ATTRIBUTE_NAME, forceInclude); }   static final String FORCE_INCLUDE_ATTRIBUTE_NAME; }
@Test public void testSetForceInclude() { AbstractRequest request = createMockBuilder(AbstractRequest.class).createMock(); Map<String, Object> scope = new HashMap<String, Object>(); expect(request.getContext(Request.REQUEST_SCOPE)).andReturn(scope).anyTimes(); replay(request); assertFalse(request.isForceInclude()); request.setForceInclude(true); assertTrue(request.isForceInclude()); verify(request); }