simplePageService = new TransactionalSimplePageService(dao, groupDao, securityService);
}
@Test
void testUpdate() throws NotFoundException {
SimplePage simplePage = new SimplePage(NAME, CONTENT, PATH_NAME);
simplePage.setId(ID);
String updatedName = "new name";
String updatedContent = "new content";
SimplePageInfoContainer simplePageInfoContainer = new SimplePageInfoContainer(ID, updatedName, updatedContent);
when(dao.isExist(simplePage.getId())).thenReturn(true);
when(dao.get(simplePage.getId())).thenReturn(simplePage);
simplePageService.updatePage(simplePageInfoContainer);
assertEquals(simplePage.getName(), updatedName);
assertEquals(simplePage.getContent(), updatedContent);
verify(dao).get(ID);
verify(dao).isExist(ID);
}