package com.boundary.sdk;

import java.io.File;

import org.apache.camel.Exchange;
import org.apache.camel.Produce;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Before;
import org.junit.Test;


/**
 *
 * @version $Revision$
 */
public class RawEventToBoundaryEvent extends CamelTestSupport {
	
    @Produce(uri = TEST_IN)
    private ProducerTemplate producerTemplate;

	
	private static final String TEST_IN="direct:in";
	
	@Before
    public void setUp() throws Exception {
        super.setUp();
    }

    @Override
    protected RouteBuilder[] createRouteBuilders() throws Exception {
    	RouteBuilder[] routes = new RouteBuilder[2];
    	
    	// Create the Boundary Event Route
		BoundaryEventRoute boundary = new BoundaryEventRoute();
		// Configure our properties
		
		routes[0] = boundary;
		
		
		routes[1] = new RouteBuilder(){
            @Override
            public void configure() throws Exception {
                from(TEST_IN)
                .marshal().serialization()
                .to(BoundaryRouteBuilder.DEFAULT_EVENT_TO_URI);
            }
        };
        
        return routes;
    }

    @Test
    public void testDefaultEvent() throws Exception {
    	RawEvent event = RawEvent.getDefaultEvent();
    	
    	producerTemplate.sendBody(event);

        Thread.sleep(2000);     
    }

}

@@ -297,14 +297,72 @@
 nit.
-Test;%0A
+Ignore;%0Aimport org.junit.Test;%0Aimport static org.junit.Assume.*;
 %0A%0A/*
@@ -589,16 +589,117 @@
 :in%22;%0A%09%0A
+%09private static final String BOUNDARY_API_KEY=%22%22;%0A%09private static final String BOUNDARY_ORG_ID=%22%22;%0A%09%0A
 %09@Before
@@ -768,24 +768,71 @@
 p();%0A    %7D%0A%0A
+%09@Ignore(%22Requires access to Boundary Server%22)%0A
     @Overrid
@@ -1087,16 +1087,158 @@
 perties%0A
+%09%09boundary.setApiKey(BOUNDARY_API_KEY);%0A%09%09boundary.setOrgId(BOUNDARY_ORG_ID);%0A%09%09boundary.setFromUri(BoundaryEventRoute.DEFAULT_EVENT_TO_URI);%0A
 %09%09%0A%09%09rou
@@ -1260,14 +1260,8 @@
 ry;%0A
-%09%09%0A%09%09%0A
 %09%09ro
@@ -1288,16 +1288,17 @@
 uilder()
+ 
 %7B%0A      
@@ -1569,16 +1569,25 @@
 %0A    %7D%0A%0A
+%09@Ignore%0A
     @Tes
@@ -1638,24 +1638,25 @@
 Exception %7B%0A
+%0A
     %09RawEven
@@ -1778,11 +1778,10 @@
  %0A    %7D%0A
-%0A
 %7D%0A

Add test for testing Boundry Event Route