Theme theme = new Theme(blog, "user-default", TEST_BLOG_LOCATION.getAbsolutePath());
blog.setEditableTheme(theme);
// There is some code that does i18n and runs assertions assuming that the locale is English
blog.setProperty(Blog.LANGUAGE_KEY, "en");
Configuration config = new Configuration();
config.setDataDirectory(TEST_BLOG_LOCATION.getAbsolutePath());
config.setUrl("http://www.yourdomain.com/blog/");
PebbleContext.getInstance().setConfiguration(config);
PebbleContext.getInstance().getConfiguration().setSecurityRealm(new MockSecurityRealm());
BlogManager.getInstance().addBlog(blog);