I have a rest controller which I am trying to Unit Test:

It has a few dependencies autowired

```
@RestController
@RequestMapping("/test")
public class TestController {

    private final Dep1 dep1;
    private final Dep2 dep2;
    private final Dep3 dep3;

    public TestController(final Dep1 dep1,
                          final Dep2 dep2,
                          final Dep3 dep3) {
        this.dep1 = dep1;
        this.dep2 = dep2;
        this.dep3 = dep3;
    }

}

```

I recently added `dep3`

```
@Service
public class Dep3 {

    private final IValidator validator;

    public Dep3(final IValidator validator) {
        this.validator= validator;
    }

    public void validate(final Request req) {
        validator.validate(req);
    }

}

```

`Dep3` has its own Autowired Dependency `IValidator`

Here is my test class:

```
@WebMvcTest(TestController.class)
public class TestControllerTest {

    @MockBean
    private Dep1 dep1;

    @MockBean
    private Dep2 dep2;

    @MockBean
    private Dep3 dep3;

    @Autowired
    private MockMvc mockMvc;

    @Test
    public void someTest() throws Exception {

    }

    @TestConfiguration
    static class InnerConfiguration {

        @Bean
        IValidator validator() {
            return new SomeValidator();
        }
    }

}

```

For my test, I need the code to actually run the `dep3.validate(..)` with the implementation `SomeValidator()`. I am unsure how to achieve this. Perhaps I am missing an annotation?