### Question:
ModulePrefs { public boolean needsUserPrefSubstitution() { return needsUserPrefSubstitution; } 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 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<Preload> getPreloads(); List<Icon> getIcons(); Map<Locale, LocaleSpec> getLocales(); Map<String, LinkSpec> getLinks(); OAuthSpec getOAuthSpec(); Multimap<String,Node> getExtraElements(); boolean needsUserPrefSubstitution(); LocaleSpec getLocale(Locale locale); ModulePrefs substitute(Substitutions substituter); @Override String toString();  }### Answer:
@Test public void needsUserPrefSubstInTitle() throws Exception { String xml = "<ModulePrefs title='Title __UP_foo__'/>"; ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertTrue(prefs.needsUserPrefSubstitution()); }
@Test public void needsUserPrefSubstInTitleUrl() throws Exception { String xml = "<ModulePrefs title='foo' title_url='http: ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertTrue(prefs.needsUserPrefSubstitution()); }
@Test public void needsUserPrefSubstInPreload() throws Exception { String xml = "<ModulePrefs title='foo'>" + " <Preload href='__UP_foo__' authz='signed'/></ModulePrefs>"; ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertTrue(prefs.needsUserPrefSubstitution()); }