@Test public void attr() {

    Document doc = Jsoup.parse("<p title=foo><p title=bar><p class=foo><p class=bar>");
    String classVal = doc.select("p").attr("class");
    assertEquals("foo", classVal);
}