chore: Update version to 2.5.0 in pom.xml and modify test to use isNull matcher

This commit is contained in:
extio-de
2026-03-22 18:13:25 +01:00
parent dce82a98cd
commit 9a6934049c
2 changed files with 3 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
<artifactId>lm-lib</artifactId>
<groupId>de.extio</groupId>
<name>lm-lib</name>
<version>2.4.2</version>
<version>2.5.0</version>
<properties>
<java.version>25</java.version>

View File

@@ -6,6 +6,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyBoolean;
import static org.mockito.ArgumentMatchers.isNull;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -39,7 +40,7 @@ class AgentErrorHandlingTest {
@Test
void parsingErrorsKeepTheirTypeWithoutAnExceptionWhenTheHandlerReturnsFalse() {
final Client client = mock(Client.class);
when(client.conversation(any(ModelCategory.class), any(), any(ToolCallData.class), anyBoolean())).thenReturn(new Completion("not json", null, null, new CompletionStatistics(1, Duration.ofMillis(1), 1, 0, 1, 0, BigDecimal.ZERO, false)));
when(client.conversation(any(ModelCategory.class), any(), isNull(), anyBoolean())).thenReturn(new Completion("not json", null, null, new CompletionStatistics(1, Duration.ofMillis(1), 1, 0, 1, 0, BigDecimal.ZERO, false)));
final AgentResponseHandler responseHandler = (completion, context) -> false;
final var agent = new Agent("ParseAgent",