This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I have one service class which is using grailsApplication to get some value from properties file.But while writing testcase for it , it is giving null pointer exception for grailsApplication . I have googled and found some ways but they are not working in my code. Please suggest some way to implement this.
grailsApplication only gets wired up for Integration tests. The simplest solution is to switch your test from a unit test to an integration test. Which makes sense, when testing a service, in my opinion.