add null checks in getTemplate to fail fast
added assertion texts in tests, formatting
Merge pull request #1 from pep1/dev-velocity-caching

Add thread safety in Velocity template evaluation.
check if cached object is the correct class
add null check to avoid possible npe
remove unused private method