doc2.setAuthor((UserImpl) securityDAO.findUser("adminuser"));
doc2.setContents(FileCopyUtils.copyToByteArray(getClass().getResourceAsStream("/void.gif")));
baseDao.create(doc2);
generatedDocIDs.add(doc2.getId());
byte[] contents = FileCopyUtils.copyToByteArray(getClass().getResourceAsStream("/void.gif"));
MultiDocument md = new MultiDocument();
Document doc = new Document();
doc.setTemporal(false);
doc.setIdentifier("void image");
doc.setWidth(1);
doc.setHeight(1);
doc.setCreation(new Date());
doc.setMimeType("image/gif");
doc.setAuthor((UserImpl) securityDAO.findUser("adminuser"));
doc.setContents(contents);
Document doc3 = new Document();
doc3.setTemporal(false);
doc3.setIdentifier("blank image");
doc3.setWidth(1);
doc3.setHeight(1);
doc3.setCreation(new Date());
doc3.setMimeType("image/gif");
doc3.setAuthor((UserImpl) securityDAO.findUser("adminuser"));
doc3.setContents(contents);
Document doc4 = new Document();
doc4.setTemporal(false);
doc4.setIdentifier("blank image");
doc4.setWidth(1);
doc4.setHeight(1);
doc4.setCreation(new Date());
doc4.setMimeType("image/gif");
doc4.setAuthor((UserImpl) securityDAO.findUser("adminuser"));
doc4.setContents(contents);
Document doc5 = new Document();
doc5.setTemporal(false);
doc5.setIdentifier("blank image");
doc5.setWidth(1);
doc5.setHeight(1);
doc5.setCreation(new Date());
doc5.setMimeType("image/gif");
doc5.setAuthor((UserImpl) securityDAO.findUser("adminuser"));
doc5.setContents(contents);
SimpleEntity entity = new SimpleEntity("john");
entity.setPhotos(md.addDocument(doc).addDocument(doc3).addDocument(doc4).addDocument(doc5));
baseDao.create(entity);
assertNotNull(baseDao.first(SimpleEntity.class));
assertNotNull(baseDao.first(MultiDocument.class));
}