### Question:
ModulePrefs { public Map<String, Feature> getFeatures() { return features; } ModulePrefs(Element element, Uri base); private  ModulePrefs(ModulePrefs prefs, Substitutions substituter); String getTitle(); Uri getTitleUrl(); String getDescription(); String getAuthor(); String getAuthorEmail(); Uri getScreenshot(); Uri getThumbnail(); String getDirectoryTitle(); String getAuthorAffiliation(); String getAuthorLocation(); Uri getAuthorPhoto(); String getAuthorAboutme(); String getAuthorQuote(); Uri getAuthorLink(); boolean getShowStats(); boolean getShowInDirectory(); boolean getSingleton(); boolean getScaling(); boolean getScrolling(); int getWidth(); int getHeight(); String getDoctype(); String getAttribute(String name); String getAttribute(String name, String defaultValue); Uri getUriAttribute(String name); boolean getBoolAttribute(String name); int getIntAttribute(String name); List<String> getCategories(); Map<String, Feature> getFeatures(); List<Feature> getAllFeatures(); Map<String, Feature> getViewFeatures(String view); List<Preload> getPreloads(); List<Icon> getIcons(); Map<Locale, LocaleSpec> getLocales(); Map<String, LinkSpec> getLinks(); OAuthSpec getOAuthSpec(); OAuth2Spec getOAuth2Spec(); Multimap<String,Node> getExtraElements(); boolean needsUserPrefSubstitution(); LocaleSpec getGlobalLocale(Locale locale); LocaleSpec getLocale(Locale locale, String view); ModulePrefs substitute(Substitutions substituter); @Override String toString();  }### Answer:
@Test public void coreInjectedAutomatically() throws Exception { String xml = "<ModulePrefs title=''><Require feature='foo'/></ModulePrefs>"; ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertEquals(2, prefs.getFeatures().size()); assertTrue(prefs.getFeatures().containsKey("foo")); assertTrue(prefs.getFeatures().containsKey("core")); }
@Test public void coreNotInjectedOnSplitCoreInclusion() throws Exception { String xml = "<ModulePrefs title=''><Require feature='core.config'/></ModulePrefs>"; ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertEquals(1, prefs.getFeatures().size()); assertTrue(prefs.getFeatures().containsKey("core.config")); }