@Test
public void testReadContent() {
try {
reader = XMLInputFactory.newInstance().createXMLStreamReader(
new StringReader(content1));
Content content = feedReader.readContent(reader);
assertTrue(content.getContent().equals(
"This is <b>XHTML</b> content."));
assertTrue(content.getAttributes() != null);
assertTrue(content.getAttributes().size() == 1);
assertTrue(content.getAttributes().get(0).getName().equals("type"));
assertTrue(content.getAttributes().get(0).getValue()
.equals("xhtml"));
reader = XMLInputFactory.newInstance().createXMLStreamReader(
new StringReader(content2));
content = feedReader.readContent(reader);
assertTrue(content.getContent().equals(
"This is <xhtml:b>XHTML</xhtml:b> content."));
assertTrue(content.getAttributes() != null);
assertTrue(content.getAttributes().size() == 1);
assertTrue(content.getAttributes().get(0).getName().equals("type"));
assertTrue(content.getAttributes().get(0).getValue()
.equals("xhtml"));
reader = XMLInputFactory.newInstance().createXMLStreamReader(
new StringReader(content3));
List<Entry> entries = feedReader.readEntry(reader, null);
assertTrue(entries != null);
assertTrue(entries.size() == 1);
Entry entry = entries.iterator().next();
assertTrue(entry.getAttributes() != null);
assertTrue(entry.getAttributes().size() == 1);
assertTrue(entry.getAttributes().get(0).getName()
.equals("xmlns:xh"));
assertTrue(entry.getAttributes().get(0).getValue().equals(
"http://some.xh.specific.uri/xh"));
content = entry.getContent();
assertTrue(content != null);
assertTrue(content.getContent().equals(
"This is <xh:b>XHTML</xh:b> content."));
assertTrue(content.getAttributes() != null);
assertTrue(content.getAttributes().size() == 1);
assertTrue(content.getAttributes().get(0).getName().equals("type"));
assertTrue(content.getAttributes().get(0).getValue()
.equals("xhtml"));
} catch (Exception e) {
e.printStackTrace();
fail("could not read title fragment.");