Fix test project

Fixes test project to be consistent with documentation; adds a real-life use case to the sample

- Upgrades gradle wrapper
- Sets Java compat to 1.7
- Minor improvements and refactors