File tree 5 files changed +11
-10
lines changed
domain/src/test/java/org/folio/spring/domain
tenant/src/test/java/org/folio/spring/tenant/controller
web/src/main/java/org/folio/spring/web/service
5 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 53
53
import org .springframework .beans .factory .annotation .Autowired ;
54
54
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
55
55
import org .springframework .boot .test .context .SpringBootTest ;
56
- import org .springframework .boot .test .mock .mockito .MockBean ;
57
56
import org .springframework .http .HttpHeaders ;
58
57
import org .springframework .http .MediaType ;
58
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
59
59
import org .springframework .test .web .servlet .MockMvc ;
60
60
import org .springframework .test .web .servlet .MvcResult ;
61
61
import org .springframework .test .web .servlet .request .MockHttpServletRequestBuilder ;
@@ -71,7 +71,7 @@ class JsonSchemasControllerTest {
71
71
@ Autowired
72
72
private MockMvc mvc ;
73
73
74
- @ MockBean
74
+ @ MockitoBean
75
75
private JsonSchemasService jsonSchemasService ;
76
76
77
77
@ ParameterizedTest
Original file line number Diff line number Diff line change 53
53
import org .springframework .beans .factory .annotation .Autowired ;
54
54
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
55
55
import org .springframework .boot .test .context .SpringBootTest ;
56
- import org .springframework .boot .test .mock .mockito .MockBean ;
57
56
import org .springframework .http .HttpHeaders ;
58
57
import org .springframework .http .MediaType ;
58
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
59
59
import org .springframework .test .web .servlet .MockMvc ;
60
60
import org .springframework .test .web .servlet .MvcResult ;
61
61
import org .springframework .test .web .servlet .request .MockHttpServletRequestBuilder ;
@@ -71,7 +71,7 @@ class RamlsControllerTest {
71
71
@ Autowired
72
72
private MockMvc mvc ;
73
73
74
- @ MockBean
74
+ @ MockitoBean
75
75
private RamlsService ramlsService ;
76
76
77
77
@ ParameterizedTest
Original file line number Diff line number Diff line change 8
8
import static org .mockito .Mockito .lenient ;
9
9
import static org .mockito .Mockito .when ;
10
10
11
+ import org .hibernate .engine .spi .SharedSessionContractImplementor ;
11
12
import org .hibernate .id .enhanced .AccessCallback ;
12
13
import org .hibernate .id .enhanced .DatabaseStructure ;
13
14
import org .hibernate .id .enhanced .Optimizer ;
@@ -51,7 +52,7 @@ void beforeEach() {
51
52
52
53
@ Test
53
54
void generateWorksTest () {
54
- when (persister .getIdentifier (any (), any ())).thenReturn (UUID );
55
+ when (persister .getIdentifier (any (), any (SharedSessionContractImplementor . class ))).thenReturn (UUID );
55
56
56
57
Object result = folioUUIDGenerator .generate (session , folioUUIDGenerator );
57
58
@@ -60,7 +61,7 @@ void generateWorksTest() {
60
61
61
62
@ Test
62
63
void generateWorksWithNullIdentifierTest () {
63
- when (persister .getIdentifier (any (), any ())).thenReturn (null );
64
+ when (persister .getIdentifier (any (), any (SharedSessionContractImplementor . class ))).thenReturn (null );
64
65
when (databaseStructure .buildCallback (any ())).thenReturn (accessCallback );
65
66
when (optimizer .generate (any ())).thenReturn (JSON_OBJECT );
66
67
Original file line number Diff line number Diff line change 42
42
import org .springframework .beans .factory .annotation .Autowired ;
43
43
import org .springframework .boot .test .autoconfigure .web .servlet .AutoConfigureMockMvc ;
44
44
import org .springframework .boot .test .context .SpringBootTest ;
45
- import org .springframework .boot .test .mock .mockito .MockBean ;
46
45
import org .springframework .http .HttpHeaders ;
47
46
import org .springframework .http .MediaType ;
47
+ import org .springframework .test .context .bean .override .mockito .MockitoBean ;
48
48
import org .springframework .test .web .servlet .MockMvc ;
49
49
import org .springframework .test .web .servlet .MvcResult ;
50
50
import org .springframework .test .web .servlet .request .MockHttpServletRequestBuilder ;
@@ -60,7 +60,7 @@ class TenantControllerTest {
60
60
@ Autowired
61
61
private MockMvc mvc ;
62
62
63
- @ MockBean
63
+ @ MockitoBean
64
64
private HibernateSchemaService hibernateSchemaService ;
65
65
66
66
@ ParameterizedTest
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ public void setup() {
44
44
messageConverters .add (new ObjectPlainTextConverter (StandardCharsets .UTF_8 ));
45
45
46
46
this .restTemplate = restTemplateBuilder
47
- .setConnectTimeout (Duration .ofSeconds (connectionTimeout ))
48
- .setReadTimeout (Duration .ofSeconds (readTimeout ))
47
+ .connectTimeout (Duration .ofSeconds (connectionTimeout ))
48
+ .readTimeout (Duration .ofSeconds (readTimeout ))
49
49
.additionalMessageConverters (messageConverters )
50
50
.build ();
51
51
}
You can’t perform that action at this time.
0 commit comments