public void testCollectionAccepts() throws Exception {
Abdera abdera = new Abdera();
Factory factory = abdera.getFactory();
Service svc = factory.newService();
Workspace ws = svc.addWorkspace("test-ws");
Collection coll = ws.addCollection("test-coll", ws.getTitle() + "/test-coll");
coll.setAcceptsEntry();
assertTrue("Collection does not accept entries.", coll.acceptsEntry());
coll.addAccepts("application/apples");
assertTrue("Collection does not accept apples.", coll.accepts("application/apples"));
StringWriter sw = new StringWriter();
svc.writeTo(sw);
// System.out.println(sw);
String s = sw.toString();
assertTrue("Service document does not specify acceptance of entries.", s.contains("application/atom+xml; type=entry"));