I have service with dependency service like:
class ParserService {
def depService;
private def parseLine(lineParts) {
...
def set = depService.findItemByName(tmpModule.name);//depService == null
...
I try to implement integration test like:
@TestFor(ParserService)
class ParserServiceTest extends IntegrationSpec {
def "should not parse comment"() {
when:
...
def resultList = service.parseAnnotations(inputStream);
resources.groovy:
beans = {
}
And I have NullPointerException: depService - null