### Question:
SaxElementUtils { public static boolean isCss(final String elementName, final Attributes attrs) { final String type = attrs.getValue("", "type"); final String href = attrs.getValue("", "href"); if (StringUtils.equals("link", elementName) && StringUtils.equals(type, CSS_TYPE) && StringUtils.startsWith(href, "/") && !StringUtils.startsWith(href, " && StringUtils.endsWith(href, LibraryType.CSS.extension)) { return true; } return false; } private  SaxElementUtils(); static boolean isCss(final String elementName, final Attributes attrs); static boolean isJavaScript(final String elementName, final Attributes attrs); static final String CSS_TYPE; static final String JS_TYPE; }### Answer:
@Test public void testIsCss() throws Exception { assertTrue("CSS Happy Path", SaxElementUtils.isCss("link", makeAtts( "href", "/css.css", "type", "text/css"))); assertFalse("CSS - not a link", SaxElementUtils.isCss("notlink", makeAtts( "href", "/css.css", "type", "text/css"))); assertFalse("CSS - not a path to css file", SaxElementUtils.isCss("link", makeAtts( "href", "/css.notcss", "type", "text/css"))); assertFalse("CSS - relative path", SaxElementUtils.isCss("link", makeAtts( "href", "css.css", "type", "text/css"))); assertFalse("CSS - external path", SaxElementUtils.isCss("link", makeAtts( "href", "http: "type", "text/css"))); assertFalse("CSS - wrongtype", SaxElementUtils.isCss("link", makeAtts( "href", "/css.css", "type", "text/notcss"))); }