### Question:
ModulePrefs { public String getAttribute(String name) { return attributes.get(name); } 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 getAttribute() throws Exception { String xml = "<ModulePrefs title='title' some_attribute='attribute' " + "empty_attribute=''/>"; ModulePrefs prefs = new ModulePrefs(XmlUtil.parse(xml), SPEC_URL); assertEquals("title", prefs.getAttribute("title")); assertEquals("attribute", prefs.getAttribute("some_attribute")); assertEquals("", prefs.getAttribute("empty_attribute")); assertNull(prefs.getAttribute("gobbledygook")); }