## Name

Test — a mock endpoint that tests messages based on a set of expected messages

## Overview

The test endpoint extends the mock endpoint to support pulling messages from another endpoint on startup to set the expected message bodies. That is, you use the test endpoint in a route and messages arriving on it will be implicitly compared to some expected messages extracted from some other location.

## Dependencies

Maven users will need to add the dependency shown in Example 19, “Test dependency” to their `pom.xml` to use this component.

Example 19. Test dependency

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-test</artifactId>
        <version>x.x.x</version>
        <!-- use the same version as your Camel core version -->
    </dependency>

## URI format

Test endpoints use the following URI format:

    test:expectedMessagesEndpointUri

`expectedMessagesEndpointUri` refers to some other endpoint URI from which the expected message bodies are pulled.