    @Test
    public void generatesKeyOnPersist() {

        final Study study = Generator.generateStudy(true);
        study.setAuthor(author);
        assertNull(study.getKey());
        executeInTransaction(() -> studyDao.persist(study));
        assertNotNull(study.getKey());

        final Study result = studyDao.findByKey(study.getKey());
        assertNotNull(result);
        assertEquals(study.getUri(), result.getUri());
    }