@Test(expected = IllegalArgumentException.class)
public void testSetApplicationContextIllegal() {

    ApplicationContext applicationContext = createMock(ApplicationContext.class);
    Integer servletContext = new Integer(1);
    expect(applicationContext.getContext()).andReturn(servletContext);
    replay(applicationContext);
    try {
        JspExpressionFactoryFactory factory = new JspExpressionFactoryFactory();
        factory.setApplicationContext(applicationContext);
    } finally {
        verify(applicationContext);
    }
}