Increasing tests coverage

- added basic Activity tests
- created json factory
- made Activity code more testable