17
17
package org .springframework .samples .petclinic .owner ;
18
18
19
19
import org .assertj .core .util .Lists ;
20
- import org .junit .jupiter .api .Assertions ;
21
20
import org .junit .jupiter .api .BeforeEach ;
22
21
import org .junit .jupiter .api .Nested ;
23
22
import org .junit .jupiter .api .Test ;
24
23
import org .junit .jupiter .api .condition .DisabledInNativeImage ;
25
- import org .mockito .Mockito ;
26
24
import org .springframework .beans .factory .annotation .Autowired ;
27
25
import org .springframework .boot .test .autoconfigure .web .servlet .WebMvcTest ;
28
- import org .springframework .boot .test .mock .mockito .MockBean ;
29
26
import org .springframework .context .annotation .ComponentScan ;
30
27
import org .springframework .context .annotation .FilterType ;
31
28
import org .springframework .test .context .aot .DisabledInAotMode ;
29
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
32
30
import org .springframework .test .web .servlet .MockMvc ;
33
31
34
32
import java .time .LocalDate ;
35
33
import java .util .Optional ;
36
34
37
- import static org .junit .Assert .assertNotNull ;
38
35
import static org .mockito .BDDMockito .given ;
39
36
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .get ;
40
37
import static org .springframework .test .web .servlet .request .MockMvcRequestBuilders .post ;
@@ -61,7 +58,7 @@ class PetControllerTests {
61
58
@ Autowired
62
59
private MockMvc mockMvc ;
63
60
64
- @ MockBean
61
+ @ MockitoBean
65
62
private OwnerRepository owners ;
66
63
67
64
@ BeforeEach
0 commit comments