added tests to fetch monitor by id, code refactor to handle monitor not found errors