[GEOS-6243]:EmptyMosaic: REST APIs support
make application context for test framework more consistent with runtime

backport of #441.
Dont' use printstacktrace, use logging as the TODO says...