assertEquals(Constants.TITLE, text.getQName());
text = factory.newTitle(Text.Type.HTML);
text.setValue("a");
assertEquals("a", text.getValue());
assertEquals(Text.Type.HTML, text.getTextType());
IRIElement iri = factory.newIcon();
assertNotNull(iri);
iri = factory.newIcon();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newIcon();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newID();
assertNotNull(iri);
iri = factory.newID();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newID();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newIRIElement(Constants.ID, null);
assertNotNull(iri);
iri = factory.newIRIElement(Constants.ID, null);
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newIRIElement(Constants.ID, null);
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
Link link = factory.newLink();
assertNotNull(link);
link = factory.newLink();
link.setHref("http://example.org/foo");
link.setRel("a");
link.setMimeType("text/foo");
link.setTitle("b");
link.setHrefLang("en");
link.setLength(10);
assertEquals("http://example.org/foo", link.getHref().toString());
assertEquals("a", link.getRel());
assertEquals("text/foo", link.getMimeType().toString());
assertEquals("b", link.getTitle());
assertEquals("en", link.getHrefLang());
assertEquals(10, link.getLength());
link = factory.newLink();
link.setHref("http://example.org/foo");
link.setRel("a");
link.setMimeType("text/foo");
link.setTitle("b");
link.setHrefLang("en");
link.setLength(10);
assertEquals("http://example.org/foo", link.getHref().toString());
assertEquals("a", link.getRel());
assertEquals("text/foo", link.getMimeType().toString());
assertEquals("b", link.getTitle());
assertEquals("en", link.getHrefLang());
assertEquals(10, link.getLength());
iri = factory.newLogo();
assertNotNull(iri);
iri = factory.newLogo();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newLogo();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
content = factory.newContent(new MimeType("text/foo"));
content.setSrc("foo");
assertNotNull(content);
assertEquals("text/foo", content.getMimeType().toString());
assertEquals("foo", content.getSrc().toString());
content = factory.newContent(new MimeType("text/foo"));
content.setDataHandler(new DataHandler(new ByteArrayDataSource("foo".getBytes())));
assertEquals("Zm9v", content.getValue());
assertEquals(Content.Type.MEDIA, content.getContentType());
el = factory.newName();
assertNotNull(el);
el = factory.newName();
el.setText("a");
assertEquals("a", el.getText());
Parser parser = factory.newParser();
assertNotNull(parser);
Person person = factory.newPerson(Constants.AUTHOR, null);
assertNotNull(person);
assertEquals(Constants.AUTHOR, person.getQName());
person = factory.newPerson(Constants.AUTHOR, null);
person.setName("a");
person.setEmail("b");
person.setUri("c");
assertEquals("a", person.getName());
assertEquals("b", person.getEmail());
assertEquals("c", person.getUri().toString());
person = factory.newPerson(Constants.AUTHOR, null);
person.setName("a");
person.setEmail("b");
person.setUri("c");
assertEquals("a", person.getName());
assertEquals("b", person.getEmail());
assertEquals("c", person.getUri().toString());
now = new Date();
dateTime = factory.newPublished();
dateTime.setValue(AtomDate.valueOf(now));
assertEquals(now, dateTime.getDate());
cal = Calendar.getInstance();
dateTime = factory.newPublished();
dateTime.setCalendar(cal);
assertEquals(cal, dateTime.getCalendar());
dateTime = factory.newPublished();
dateTime.setDate(now);
assertEquals(now, dateTime.getDate());
dateTime = factory.newPublished();
assertNotNull(dateTime);
dateTime = factory.newPublished();
dateTime.setTime(now.getTime());
assertEquals(now.getTime(), dateTime.getTime());
dateTime = factory.newPublished();
dateTime.setString(AtomDate.format(now));
assertEquals(AtomDate.format(now), dateTime.getString());
assertEquals(now, dateTime.getDate());
Service service = factory.newService();
assertNotNull(service);
Source source = factory.newSource();
assertNotNull(source);
el = factory.newElement(Constants.NAME);
assertNotNull(el);
assertEquals(Constants.NAME, el.getQName());
el = factory.newElement(Constants.NAME);
el.setText("a");
assertNotNull(el);
assertEquals(Constants.NAME, el.getQName());
assertEquals("a", el.getText());
text = factory.newText(Constants.TITLE, Text.Type.TEXT);
assertNotNull(text);
assertEquals(Text.Type.TEXT, text.getTextType());
text = factory.newRights();
text.setValue("a");
assertEquals("a", text.getValue());
assertEquals(Text.Type.TEXT, text.getTextType());
text = factory.newSubtitle();
text.setValue("a");
assertEquals("a", text.getValue());
assertEquals(Text.Type.TEXT, text.getTextType());
text = factory.newSummary();
text.setValue("a");
assertEquals("a", text.getValue());
assertEquals(Text.Type.TEXT, text.getTextType());
text = factory.newText(Constants.TITLE, Text.Type.TEXT, null);
text.setValue("a");
assertEquals(Constants.TITLE, text.getQName());
assertEquals("a", text.getValue());
assertEquals(Text.Type.TEXT, text.getTextType());
text = factory.newTitle();
text.setValue("a");
assertEquals("a", text.getValue());
assertEquals(Text.Type.TEXT, text.getTextType());
content = factory.newContent(Content.Type.TEXT);
content.setValue("a");
assertEquals("a", content.getValue());
assertEquals(Content.Type.TEXT, content.getContentType());
now = new Date();
dateTime = factory.newUpdated();
dateTime.setValue(AtomDate.valueOf(now));
assertEquals(now, dateTime.getDate());
cal = Calendar.getInstance();
dateTime = factory.newUpdated();
dateTime.setCalendar(cal);
assertEquals(cal, dateTime.getCalendar());
dateTime = factory.newUpdated();
dateTime.setDate(now);
assertEquals(now, dateTime.getDate());
dateTime = factory.newUpdated();
assertNotNull(dateTime);
dateTime = factory.newUpdated();
dateTime.setTime(now.getTime());
assertEquals(now.getTime(), dateTime.getTime());
dateTime = factory.newUpdated();
dateTime.setString(AtomDate.format(now));
assertEquals(AtomDate.format(now), dateTime.getString());
assertEquals(now, dateTime.getDate());
iri = factory.newUri();
assertNotNull(iri);
iri = factory.newUri();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
iri = factory.newUri();
iri.setValue("http://example.org/foo");
assertEquals("http://example.org/foo", iri.getValue().toString());
Workspace workspace = factory.newWorkspace();
assertNotNull(workspace);
div = factory.newDiv();
content = factory.newContent(Content.Type.XHTML);
content.setValueElement(div);