We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e487c08 commit 44a1123Copy full SHA for 44a1123
spring-data-mongodb/pom.xml
@@ -304,7 +304,7 @@
304
305
<dependency>
306
<groupId>io.mockk</groupId>
307
- <artifactId>mockk</artifactId>
+ <artifactId>mockk-jvm</artifactId>
308
<version>${mockk}</version>
309
<scope>test</scope>
310
</dependency>
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/MongoTemplateUnitTests.java
@@ -2458,8 +2458,7 @@ private MongoTemplate mockOutGetDb() {
2458
2459
@Override
2460
protected MongoOperations getOperationsForExceptionHandling() {
2461
- MongoTemplate template = spy(this.template);
2462
- lenient().when(template.getDb()).thenThrow(new MongoException("Error"));
+ when(template.getMongoDatabaseFactory().getMongoDatabase()).thenThrow(new MongoException("Error"));
2463
return template;
2464
}
2465
0 commit comments