Spock mock verify returns 0 invocations
Im working on a Spring Boot java service that contains a Camel Processor class as follows: public class MyProc implements Processor { @Autowired private LogService logService; public void process(Exchange e) { // exchange object processing logService.update(e) } } And I have the following Spock test: class MyProcTest extends Specification { @Shared def logService = Mock(LogService) @Shared def proc = new MyProc() def ctx = new DefaultCamelContext() def exch = new DefaultExchange(ctx) void setupSpec() { proc.logService = logService } def "log is updated when valid exchange is processed"() {