public class SimpleServiceBuilderTestCase extends AbstractMuleTestCase
{
public void testFullConfiguration() throws Exception
{
SimpleService simpleService = new SimpleServiceBuilder().name("test-simple-service-full")
.inboundAddress("test://foo")
.transformers(new StringAppendTransformer("bar"))
.responseTransformers(new ObjectToByteArray(), new GZipCompressTransformer())
.component(EchoComponent.class)
.type(Type.DIRECT)
.exceptionStrategy(new DefaultMessagingExceptionStrategy(muleContext, true))
.build(muleContext);
assertEquals("test-simple-service-full", simpleService.getName());
assertEquals(EchoComponent.class,
((AbstractJavaComponent) simpleService.getComponent()).getObjectType());
}