Add mocking
Basic exception handling