Make handler calls usable for tests
Make viewMap a property of the view
Add tests