Add some handler adapter tests
Remove inaccurate TODO
Check for null before trying to use ApplicationContext

Fixes gh-145