* Tests {@link ServletUtil#getCurrentContainer(ServletRequest)}.
*/
@Test
public void testGetCurrentContainer() {
Request request = createMock(Request.class);
ApplicationContext context = createMock(ApplicationContext.class);
TilesContainer container = createMock(TilesContainer.class);
Map<String, Object> attribs = new HashMap<String, Object>();
attribs.put("myKey", container);
Map<String, Object> requestScope = new HashMap<String, Object>();
requestScope.put(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, container);
expect(request.getApplicationContext()).andReturn(context);
expect(context.getApplicationScope()).andReturn(attribs).anyTimes();
expect(request.getContext("request")).andReturn(requestScope);
replay(request, context, container);
assertEquals(container, TilesAccess.getCurrentContainer(request));
verify(request, context, container);