"Cannot invoke method containsKey() on null object" type="java.lang.NullPointerException"
It happens then You override setUp() method but forget to call super method at first. So instead of writing:
class SomeTests extends GrailsUnitTestCase {
void setUp() {
// Some initializations.
}
}
Call super method at first:
class SomeTests extends GrailsUnitTestCase {
void setUp() {
// Call super method at first.
super.setUp()
// Some initializations.
}
}
That's all.
Thank you so much.I was at loss trying to figure where the problem was coming from.
ReplyDeleteGlad that it was useful :)
ReplyDelete