private void injectContentIntoContentDao(ContentKey contentKey, String contentName) { ContentEntity content = new ContentEntity(); content.setKey(contentKey); content.setName(contentName); when(contentDao.findByKey(contentKey)).thenReturn(content); }
private SectionContentEntity createSectionContent(ContentKey contentKey, String contentName) { ContentEntity content = new ContentEntity(); content.setKey(contentKey); content.setName(contentName); SectionContentEntity sectionContent = new SectionContentEntity(); sectionContent.setKey(new SectionContentKey(contentKey.toString())); sectionContent.setContent(content); return sectionContent; }