JUnit Testing & Mock Service Task

Hey,

Have you tried the standard way of working with @MockBean? You inject the bean and annotate it with @MockBean. Something like (test annotations are missing):

public class MyTest {

    @MockBean 
    @Autowired
    private MyDelegate myDelegate;

    @Test
    public void myTest() {
        // Do your thing
    } 
}

Cheers,
Filip