fix NPE in tests when codecs aren't initialized
fix test GrailsApplication initialization