testUser = TestUtils.setupUser("mediaFileTestUser");
testWeblog1 = TestUtils.setupWeblog("testblog1", testUser);
testWeblog2 = TestUtils.setupWeblog("testblog2", testUser);
MediaFileManager mgr = WebloggerFactory.getWeblogger().getMediaFileManager();
JPAMediaFileManagerImpl mmgr = (JPAMediaFileManagerImpl) mgr;
assertTrue("Upgrade required", mmgr.isFileStorageUpgradeRequired());
mmgr.upgradeFileStorage();
TestUtils.endSession(true);
assertFalse("Upgrade required", mmgr.isFileStorageUpgradeRequired());
// now, let's check to see if migration was sucessful
MediaFileDirectory root1 = mgr.getMediaFileRootDirectory(testWeblog1);
assertNotNull("testblog1's mediafile dir exists", root1);