Ejemplo n.º 1
0
  private void injectContentIntoContentDao(ContentKey contentKey, String contentName) {
    ContentEntity content = new ContentEntity();
    content.setKey(contentKey);
    content.setName(contentName);

    when(contentDao.findByKey(contentKey)).thenReturn(content);
  }
Ejemplo n.º 2
0
  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;
  }