fixed restapi method for mark as read, added tests