use of org.finos.waltz.model.bookmark.ImmutableBookmark in project waltz by khartec.
the class BookmarkServiceTest method bookmarksCanBeUpdated.
@Test
public void bookmarksCanBeUpdated() {
EntityReference bookmarkedEntity = mkAppRef();
Bookmark bookmark = createBookmark(bookmarkedEntity, "test bookmark1");
Long bookmarkId = bookmark.id().get();
assertEquals(bookmark, svc.getById(bookmarkId));
ImmutableBookmark updatedBookmark = ImmutableBookmark.copyOf(bookmark).withTitle("Updated").withLastUpdatedAt(DateTimeUtilities.today().atStartOfDay().plusHours(1));
svc.update(updatedBookmark, "admin");
assertEquals(updatedBookmark, svc.getById(bookmarkId));
}
Aggregations