public class SimpleApplicationManagerTest extends TestCase {
public void testGetCurrentApplication() throws Exception {
SimpleApplicationManager manager = new SimpleApplicationManager();
ApplicationFactory applicationFactory = createMock(ApplicationFactory.class);
manager.setApplicationFactory(applicationFactory);
Application application = createMock(Application.class);
expect(applicationFactory.newApplication(null)).andReturn(application);
replay(applicationFactory);
assertNull(manager.getCurrentApplication());