Grails Unit Test Filters with the injected Service

Recently I was writing unit tests for a filter in my project, which makes use of a service. Normally mocking using 'metaclass' and 'demand' doesn't work for services in filter, because filters don't let mock the service methods like we do in other classes or controller. Suppose we have a filter like: [java] class SomeFilters { ...

by Neha Gupta
Tag: Injected Service