I think your question is similar to Add one additional bean to "@WebMvcTest".
There are multiple ways to add your bean into slice test context. You can use @Import, @ComponentScan, @TestConfiguration (and create your bean by yourself with new operator).