Search in sources :

Example 1 with SimpleUuidGenerator

use of org.apache.camel.impl.SimpleUuidGenerator in project camel by apache.

the class CamelContextFactoryBeanTest method testGetCustomUuidGenerator.

public void testGetCustomUuidGenerator() throws Exception {
    StaticApplicationContext applicationContext = new StaticApplicationContext();
    applicationContext.registerSingleton("uuidGenerator", SimpleUuidGenerator.class);
    factory.setApplicationContext(applicationContext);
    factory.afterPropertiesSet();
    UuidGenerator uuidGenerator = factory.getContext().getUuidGenerator();
    assertTrue(uuidGenerator instanceof SimpleUuidGenerator);
}
Also used : UuidGenerator(org.apache.camel.spi.UuidGenerator) SimpleUuidGenerator(org.apache.camel.impl.SimpleUuidGenerator) ActiveMQUuidGenerator(org.apache.camel.impl.ActiveMQUuidGenerator) SimpleUuidGenerator(org.apache.camel.impl.SimpleUuidGenerator) StaticApplicationContext(org.springframework.context.support.StaticApplicationContext)

Aggregations

ActiveMQUuidGenerator (org.apache.camel.impl.ActiveMQUuidGenerator)1 SimpleUuidGenerator (org.apache.camel.impl.SimpleUuidGenerator)1 UuidGenerator (org.apache.camel.spi.UuidGenerator)1 StaticApplicationContext (org.springframework.context.support.StaticApplicationContext)1