Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ io.projectreactor:reactor-core;3.7.14
io.vertx:vertx-codegen;4.5.23
io.vertx:vertx-core;4.5.23
javax.websocket:javax.websocket-api;1.1
org.apache.commons:commons-compress;1.26.0
org.apache.ant:ant;1.10.15
org.apache.avro:avro;1.11.4
org.apache.avro:avro-maven-plugin;1.11.4
Expand Down Expand Up @@ -140,7 +139,6 @@ org.eclipse.jetty:jetty-alpn-conscrypt-server;9.4.58.v20250814
org.eclipse.jetty:jetty-server;9.4.58.v20250814
org.eclipse.jetty:jetty-servlet;9.4.58.v20250814
org.eclipse.jetty.http2:http2-server;9.4.58.v20250814
org.hamcrest:hamcrest-all;1.3
org.junit.jupiter:junit-jupiter;5.13.4
org.junit.jupiter:junit-jupiter-api;5.13.4
org.junit.jupiter:junit-jupiter-engine;5.13.4
Expand Down Expand Up @@ -197,13 +195,13 @@ org.codehaus.mojo:exec-maven-plugin;3.5.1
org.codehaus.mojo:xml-maven-plugin;1.1.0
org.eclipse.jetty:jetty-maven-plugin;9.4.58.v20250814
org.eclipse.m2e:lifecycle-mapping;1.0.0
org.jacoco:jacoco-maven-plugin;0.8.13
org.jacoco:org.jacoco.agent;0.8.13
org.jacoco:jacoco-maven-plugin;0.8.14
org.jacoco:org.jacoco.agent;0.8.14
org.mockito:mockito-core;4.11.0
org.mockito:mockito-inline;4.11.0
org.moditect:moditect-maven-plugin;1.0.0.RC1
org.owasp:dependency-check-maven;12.1.1
org.ow2.asm:asm;9.8
org.ow2.asm:asm;9.9.1
org.revapi:revapi;0.15.1
org.revapi:revapi-java;0.28.3
org.revapi:revapi-java-spi;0.25.1
Expand Down Expand Up @@ -403,10 +401,3 @@ springboot3_ch.qos.logback:logback-classic;1.5.22
# Used for Spring version updates
springboot3_org.springframework.boot:spring-boot-dependencies;3.5.9
springboot3_org.springframework.cloud:spring-cloud-dependencies;2025.0.1

# Java 7 support

# Jackson dropped support for Java 7 with the release of 2.14.0.
# Add custom Jackson dependencies for Track 1 libraries using Jackson.
org.mockito:mockito-junit-jupiter;4.11.0
com.github.tomakehurst:wiremock-jre8;2.35.2
18 changes: 0 additions & 18 deletions sdk/ai/azure-ai-voicelive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,29 +76,11 @@ Code generated by Microsoft (R) TypeSpec Code Generator.
<version>5.13.4</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>4.11.0</version> <!-- {x-version-update;org.mockito:mockito-junit-jupiter;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>3.7.11</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>2.35.2</version> <!-- {x-version-update;com.github.tomakehurst:wiremock-jre8;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
import com.azure.core.http.HttpHeaders;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import reactor.core.publisher.Mono;

import java.net.URI;
Expand All @@ -23,14 +20,9 @@
/**
* Unit tests for {@link VoiceLiveAsyncClient}.
*/
@ExtendWith(MockitoExtension.class)
class VoiceLiveAsyncClientTest {

@Mock
private KeyCredential mockKeyCredential;

@Mock
private HttpHeaders mockHeaders;
private final KeyCredential mockKeyCredential = new KeyCredential("fake");
private final HttpHeaders mockHeaders = new HttpHeaders();

private URI testEndpoint;
private VoiceLiveAsyncClient client;
Expand All @@ -50,17 +42,15 @@ void testConstructorWithValidParameters() {
@Test
void testConstructorWithNullEndpoint() {
// Act & Assert
assertThrows(NullPointerException.class, () -> {
new VoiceLiveAsyncClient(null, mockKeyCredential, "2024-10-01-preview", mockHeaders);
});
assertThrows(NullPointerException.class,
() -> new VoiceLiveAsyncClient(null, mockKeyCredential, "2024-10-01-preview", mockHeaders));
}

@Test
void testConstructorWithNullCredential() {
// Act & Assert
assertThrows(NullPointerException.class, () -> {
new VoiceLiveAsyncClient(testEndpoint, (KeyCredential) null, "2024-10-01-preview", mockHeaders);
});
assertThrows(NullPointerException.class,
() -> new VoiceLiveAsyncClient(testEndpoint, (KeyCredential) null, "2024-10-01-preview", mockHeaders));
}

@Test
Expand All @@ -79,9 +69,7 @@ void testStartSessionWithValidOptions() {
@Test
void testStartSessionWithNullOptions() {
// Act & Assert
assertThrows(NullPointerException.class, () -> {
client.startSession((String) null);
});
assertThrows(NullPointerException.class, () -> client.startSession(null));
}

@Test
Expand All @@ -98,9 +86,7 @@ void testStartSessionWithModelString() {
@Test
void testStartSessionWithNullModel() {
// Act & Assert
assertThrows(NullPointerException.class, () -> {
client.startSession((String) null);
});
assertThrows(NullPointerException.class, () -> client.startSession(null));
}

@Test
Expand Down Expand Up @@ -140,13 +126,9 @@ void testOptimizedConnectMethods() {
});

// Test null parameter validation for startSession methods
assertThrows(NullPointerException.class, () -> {
client.startSession((String) null);
});
assertThrows(NullPointerException.class, () -> client.startSession(null));

assertThrows(NullPointerException.class, () -> {
client.startSession((String) null);
});
assertThrows(NullPointerException.class, () -> client.startSession(null));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@

import com.azure.core.credential.KeyCredential;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.util.Configuration;
import com.azure.core.test.utils.MockTokenCredential;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertNotNull;
Expand All @@ -21,20 +17,9 @@
/**
* Unit tests for {@link VoiceLiveClientBuilder}.
*/
@ExtendWith(MockitoExtension.class)
class VoiceLiveClientBuilderTest {

@Mock
private KeyCredential mockKeyCredential;

@Mock
private TokenCredential mockTokenCredential;

@Mock
private HttpClient mockHttpClient;

@Mock
private Configuration mockConfiguration;
private final KeyCredential mockKeyCredential = new KeyCredential("fake");
private final TokenCredential mockTokenCredential = new MockTokenCredential();

private VoiceLiveClientBuilder clientBuilder;

Expand Down Expand Up @@ -74,17 +59,15 @@ void testBuilderWithValidEndpointAndTokenCredential() {
@Test
void testBuilderWithNullEndpoint() {
// Act & Assert
assertThrows(NullPointerException.class, () -> {
clientBuilder.endpoint(null).credential(mockKeyCredential).buildAsyncClient();
});
assertThrows(NullPointerException.class,
() -> clientBuilder.endpoint(null).credential(mockKeyCredential).buildAsyncClient());
}

@Test
void testBuilderWithInvalidEndpoint() {
// Act & Assert
assertThrows(IllegalArgumentException.class, () -> {
clientBuilder.endpoint("http:// invalid-url").credential(mockKeyCredential).buildAsyncClient();
});
assertThrows(IllegalArgumentException.class,
() -> clientBuilder.endpoint("http:// invalid-url").credential(mockKeyCredential).buildAsyncClient());
}

@Test
Expand All @@ -93,9 +76,8 @@ void testBuilderWithNullCredential() {
String endpoint = "https://test.cognitiveservices.azure.com";

// Act & Assert
assertThrows(NullPointerException.class, () -> {
clientBuilder.endpoint(endpoint).credential((KeyCredential) null).buildAsyncClient();
});
assertThrows(NullPointerException.class,
() -> clientBuilder.endpoint(endpoint).credential((KeyCredential) null).buildAsyncClient());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,11 @@
import com.azure.ai.voicelive.models.ServerVadTurnDetection;
import com.azure.ai.voicelive.models.ToolChoiceSelection;
import com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition;
import com.azure.ai.voicelive.models.VoiceLiveToolDefinition;
import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
import com.azure.ai.voicelive.models.VoiceLiveToolDefinition;
import com.azure.core.util.BinaryData;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;

import java.util.Arrays;
import java.util.List;
Expand All @@ -33,7 +30,6 @@
/**
* Unit tests for {@link VoiceLiveSessionOptions}.
*/
@ExtendWith(MockitoExtension.class)
class VoiceLiveSessionOptionsTest {

private VoiceLiveSessionOptions sessionOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ void testSetAndGetDescription() {
@Test
void testSetDescriptionWithNull() {
// Act & Assert
assertDoesNotThrow(() -> {
functionTool.setDescription(null);
});
assertDoesNotThrow(() -> functionTool.setDescription(null));
assertNull(functionTool.getDescription());
}

Expand Down Expand Up @@ -84,9 +82,7 @@ void testSetAndGetParameters() {
@Test
void testSetParametersWithNull() {
// Act & Assert
assertDoesNotThrow(() -> {
functionTool.setParameters(null);
});
assertDoesNotThrow(() -> functionTool.setParameters(null));
assertNull(functionTool.getParameters());
}

Expand Down Expand Up @@ -172,7 +168,7 @@ void testEqualsAndHashCode() {
assertNotEquals(tool1, tool3);

// Test with null
assertNotEquals(tool1, null);
assertNotNull(tool1);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
import com.azure.core.util.BinaryData;
import org.junit.jupiter.api.Test;

import java.io.IOException;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;

Expand All @@ -17,7 +15,7 @@
class MCPServerEventTest {

@Test
void testServerEventMcpListToolsInProgress() throws IOException {
void testServerEventMcpListToolsInProgress() {
// Arrange
String json = "{" + "\"event_id\":\"evt-1\"," + "\"type\":\"mcp_list_tools.in_progress\","
+ "\"item_id\":\"item-123\"" + "}";
Expand All @@ -34,7 +32,7 @@ void testServerEventMcpListToolsInProgress() throws IOException {
}

@Test
void testServerEventMcpListToolsCompleted() throws IOException {
void testServerEventMcpListToolsCompleted() {
// Arrange
String json = "{" + "\"event_id\":\"evt-2\"," + "\"type\":\"mcp_list_tools.completed\","
+ "\"item_id\":\"item-456\"" + "}";
Expand All @@ -51,7 +49,7 @@ void testServerEventMcpListToolsCompleted() throws IOException {
}

@Test
void testServerEventMcpListToolsFailed() throws IOException {
void testServerEventMcpListToolsFailed() {
// Arrange
String json = "{" + "\"event_id\":\"evt-3\"," + "\"type\":\"mcp_list_tools.failed\","
+ "\"item_id\":\"item-789\"" + "}";
Expand All @@ -67,7 +65,7 @@ void testServerEventMcpListToolsFailed() throws IOException {
}

@Test
void testServerEventResponseMcpCallArgumentsDelta() throws IOException {
void testServerEventResponseMcpCallArgumentsDelta() {
// Arrange
String json = "{" + "\"event_id\":\"evt-4\"," + "\"type\":\"response.mcp_call_arguments.delta\","
+ "\"item_id\":\"call-item-1\"," + "\"response_id\":\"resp-1\"," + "\"output_index\":0,"
Expand All @@ -88,7 +86,7 @@ void testServerEventResponseMcpCallArgumentsDelta() throws IOException {
}

@Test
void testServerEventResponseMcpCallArgumentsDeltaWithObfuscation() throws IOException {
void testServerEventResponseMcpCallArgumentsDeltaWithObfuscation() {
// Arrange
String json = "{" + "\"event_id\":\"evt-5\"," + "\"type\":\"response.mcp_call_arguments.delta\","
+ "\"item_id\":\"call-item-2\"," + "\"response_id\":\"resp-2\"," + "\"output_index\":1,"
Expand All @@ -105,7 +103,7 @@ void testServerEventResponseMcpCallArgumentsDeltaWithObfuscation() throws IOExce
}

@Test
void testServerEventResponseMcpCallArgumentsDone() throws IOException {
void testServerEventResponseMcpCallArgumentsDone() {
// Arrange
String json = "{" + "\"event_id\":\"evt-6\"," + "\"type\":\"response.mcp_call_arguments.done\","
+ "\"item_id\":\"call-item-3\"," + "\"response_id\":\"resp-3\"," + "\"output_index\":0,"
Expand All @@ -126,7 +124,7 @@ void testServerEventResponseMcpCallArgumentsDone() throws IOException {
}

@Test
void testJsonRoundTripForInProgress() throws IOException {
void testJsonRoundTripForInProgress() {
// Arrange
String originalJson = "{" + "\"event_id\":\"round-trip-1\"," + "\"type\":\"mcp_list_tools.in_progress\","
+ "\"item_id\":\"item-rt\"" + "}";
Expand All @@ -146,7 +144,7 @@ void testJsonRoundTripForInProgress() throws IOException {
}

@Test
void testJsonRoundTripForArgumentsDelta() throws IOException {
void testJsonRoundTripForArgumentsDelta() {
// Arrange
String originalJson = "{" + "\"event_id\":\"round-trip-2\"," + "\"type\":\"response.mcp_call_arguments.delta\","
+ "\"item_id\":\"item-delta\"," + "\"response_id\":\"resp-delta\"," + "\"output_index\":2,"
Expand All @@ -167,7 +165,7 @@ void testJsonRoundTripForArgumentsDelta() throws IOException {
}

@Test
void testComplexArgumentsInDone() throws IOException {
void testComplexArgumentsInDone() {
// Arrange
String complexArgs = "{\"nested\":{\"array\":[1,2,3]},\"string\":\"value\",\"bool\":true}";
String json = "{" + "\"event_id\":\"evt-complex\"," + "\"type\":\"response.mcp_call_arguments.done\","
Expand All @@ -183,7 +181,7 @@ void testComplexArgumentsInDone() throws IOException {
}

@Test
void testMultipleDeltaEvents() throws IOException {
void testMultipleDeltaEvents() {
// Simulate streaming multiple delta events
String[] deltas = {
"{\"event_id\":\"evt-7\",\"type\":\"response.mcp_call_arguments.delta\",\"item_id\":\"stream-1\",\"response_id\":\"resp-7\",\"output_index\":0,\"delta\":\"{\"}",
Expand Down
Loading
Loading