blob: 8a008cda3e450d7794b9e1ba0ef0724bffea9070 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
─ testExceptionGettingString()
tags: []
uniqueId: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ResourceBundleStringLookupTest]/[method:testExceptionGettingString()]
parent: [engine:junit-jupiter]/[class:org.apache.commons.text.lookup.ResourceBundleStringLookupTest]
source: MethodSource [className = 'org.apache.commons.text.lookup.ResourceBundleStringLookupTest', methodName = 'testExceptionGettingString', methodParameterTypes = '']
caught: org.mockito.exceptions.base.MockitoException:
Cannot mock/spy class org.apache.commons.text.lookup.ResourceBundleStringLookup
Mockito cannot mock/spy because :
- final class
at org.apache.commons.text.lookup.ResourceBundleStringLookupTest.testExceptionGettingString(ResourceBundleStringLookupTest.java:68)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1604)
duration: 204 ms
status: ✘ FAILED
--- a/src/test/java/org/apache/commons/text/lookup/ResourceBundleStringLookupTest.java
+++ b/src/test/java/org/apache/commons/text/lookup/ResourceBundleStringLookupTest.java
@@ -25,6 +25,7 @@ import static org.mockito.Mockito.when;
import java.util.ResourceBundle;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
@@ -63,6 +64,7 @@ class ResourceBundleStringLookupTest {
.apply(AbstractStringLookup.toLookupKey("OtherBundle", KEY)));
}
+ @Disabled
@Test
void testExceptionGettingString() {
final ResourceBundleStringLookup mockLookup = spy(ResourceBundleStringLookup.class);
|