When I write spring boot test and define service as following:
@MockBean
@InjectMocks
private Service service;
i got BeanCreationException: Could not inject field ... cannot have an existing value Why ?
Why i cannot have my service mocked and all its autowired fields mocked as well ?