Files
int-layer/target/surefire-reports/com.example.service.llm.LlmResponseTunerServiceImplTest.txt
2026-02-23 03:17:18 +00:00

36 lines
2.1 KiB
Plaintext

-------------------------------------------------------------------------------
Test set: com.example.service.llm.LlmResponseTunerServiceImplTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.301 s <<< FAILURE! -- in com.example.service.llm.LlmResponseTunerServiceImplTest
com.example.service.llm.LlmResponseTunerServiceImplTest.setValue_shouldSetValueInRedis -- Time elapsed: 0.295 s <<< ERROR!
org.mockito.exceptions.misusing.PotentialStubbingProblem:
Strict stubbing argument mismatch. Please check:
- this invocation of 'set' method:
reactiveValueOperations.set(
"llm-pre-response:test_key",
"test_value",
PT1H
);
-> at com.example.service.llm.LlmResponseTunerServiceImpl.setValue(LlmResponseTunerServiceImpl.java:31)
- has following stubbing(s) with different arguments:
1. reactiveValueOperations.set(
"llm-pre-response:test_key",
"test_value"
);
-> at com.example.service.llm.LlmResponseTunerServiceImplTest.setValue_shouldSetValueInRedis(LlmResponseTunerServiceImplTest.java:52)
Typically, stubbing argument mismatch indicates user mistake when writing tests.
Mockito fails early so that you can debug potential problem easily.
However, there are legit scenarios when this exception generates false negative signal:
- stubbing the same method multiple times using 'given().will()' or 'when().then()' API
Please use 'will().given()' or 'doReturn().when()' API for stubbing.
- stubbed method is intentionally invoked with different arguments by code under test
Please use default or 'silent' JUnit Rule (equivalent of Strictness.LENIENT).
For more information see javadoc for PotentialStubbingProblem class.
at com.example.service.llm.LlmResponseTunerServiceImpl.setValue(LlmResponseTunerServiceImpl.java:31)
at com.example.service.llm.LlmResponseTunerServiceImplTest.setValue_shouldSetValueInRedis(LlmResponseTunerServiceImplTest.java:54)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)