Multi-module test support framework for Embabel Agent applications providing integration testing, mock AI services, and test configuration utilities
Add Embabel Agent Test Support modules to your Maven project's test dependencies.
The framework provides three modules. Add the ones you need:
For Mockito-based integration testing with LLM stubbing and verification.
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>Use when: Writing integration tests that mock LLM operations.
For fake embedding models and AI utilities without API calls.
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test-common</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>Use when: Testing embedding operations or vector storage.
For Spring test configuration with pre-configured fake AI beans.
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test-internal</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>Use when: Setting up Spring Boot tests with complete fake AI infrastructure.
If you want full testing capabilities, add all three modules:
<dependencies>
<!-- Integration testing with Mockito -->
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>
<!-- Fake embedding models and AI utilities -->
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test-common</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>
<!-- Test configuration and Spring test setup -->
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-test-internal</artifactId>
<version>0.3.3</version>
<scope>test</scope>
</dependency>
</dependencies>If using Gradle, add dependencies to your build.gradle:
dependencies {
testImplementation 'com.embabel.agent:embabel-agent-test:0.3.3'
testImplementation 'com.embabel.agent:embabel-agent-test-common:0.3.3'
testImplementation 'com.embabel.agent:embabel-agent-test-internal:0.3.3'
}Or for Gradle Kotlin DSL (build.gradle.kts):
dependencies {
testImplementation("com.embabel.agent:embabel-agent-test:0.3.3")
testImplementation("com.embabel.agent:embabel-agent-test-common:0.3.3")
testImplementation("com.embabel.agent:embabel-agent-test-internal:0.3.3")
}After adding dependencies, verify your setup with a simple test:
import com.embabel.agent.test.integration.EmbabelMockitoIntegrationTest;
import org.junit.jupiter.api.Test;
public class VerifySetupTest extends EmbabelMockitoIntegrationTest {
@Test
void verifySetup() {
// If this compiles and runs, setup is correct
}
}import com.embabel.common.test.ai.FakeEmbeddingModel
import org.junit.jupiter.api.Test
class VerifySetupTest {
@Test
fun `verify setup`() {
val model = FakeEmbeddingModel()
// If this compiles, setup is correct
}
}If Maven cannot find the dependencies:
mvn clean install to refresh dependenciesIf you encounter version conflicts:
mvn dependency:treeIf IDE cannot resolve imports: