camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject [1/2] camel git commit: CAMEL-11244: camel-hazelcast: use string/enum instead of numeric operation type
Date Thu, 22 Jun 2017 08:23:18 GMT
Repository: camel
Updated Branches:
  refs/heads/master ceba451eb -> f5296eb88


http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicProducer.java b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicProducer.java
index 5ca57df..82c91b0 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicProducer.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/component/hazelcast/topic/HazelcastTopicProducer.java
@@ -23,6 +23,7 @@ import org.apache.camel.component.hazelcast.HazelcastComponentHelper;
 import org.apache.camel.component.hazelcast.HazelcastConstants;
 import org.apache.camel.component.hazelcast.HazelcastDefaultEndpoint;
 import org.apache.camel.component.hazelcast.HazelcastDefaultProducer;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
 
 /**
  *
@@ -41,19 +42,18 @@ public class HazelcastTopicProducer extends HazelcastDefaultProducer {
     }
 
     public void process(Exchange exchange) throws Exception {
-        final int operation = lookupOperationNumber(exchange);
+        final HazelcastOperation operation = lookupOperation(exchange);
 
         switch (operation) {
-        case -1:
-            // default operation to publish
-        case HazelcastConstants.PUBLISH_OPERATION:
+
+        case PUBLISH:
             this.publish(exchange);
             break;
         default:
             throw new IllegalArgumentException(String.format("The value '%s' is not allowed for parameter '%s' on the TOPIC cache.", operation, HazelcastConstants.OPERATION));
         }
 
-        // finally copy headers
+         // finally copy headers
         HazelcastComponentHelper.copyHeaders(exchange);
     }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
index e84f0f6..12aae31 100644
--- a/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
+++ b/components/camel-hazelcast/src/main/java/org/apache/camel/processor/aggregate/hazelcast/HazelcastAggregationRepository.java
@@ -49,7 +49,7 @@ import org.slf4j.LoggerFactory;
  * Hazelcast settings are given to an end-user and can be controlled with repositoryName and persistentRespositoryName,
  * both are {@link com.hazelcast.core.IMap} <String, Exchange>. However HazelcastAggregationRepository
  * can run it's own Hazelcast instance, but obviously no benefits of Hazelcast clustering are gained this way.
- * If the {@link HazelcastAggregationRepository} uses it's own local {@link HazelcastInstance} it will destroy this
+ * If the {@link HazelcastAggregationRepository} uses it's own local {@link HazelcastInstance} it will DESTROY this
  * instance on {@link #doStop()}. You should control {@link HazelcastInstance} lifecycle yourself whenever you instantiate
  * {@link HazelcastAggregationRepository} passing a reference to the instance.
  *

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastAtomicnumberProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastAtomicnumberProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastAtomicnumberProducerTest.java
index 7fd1316..42e2b2c 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastAtomicnumberProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastAtomicnumberProducerTest.java
@@ -136,27 +136,27 @@ public class HazelcastAtomicnumberProducerTest extends HazelcastCamelTestSupport
                 from("direct:setInvalid").setHeader(HazelcastConstants.OPERATION, constant("invalid"))
                         .to(String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:set").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.SETVALUE_OPERATION))
+                from("direct:set").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.SET_VALUE))
                         .to(String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
+                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET)).to(String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:increment").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.INCREMENT_OPERATION)).to(
+                from("direct:increment").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.INCREMENT)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:decrement").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DECREMENT_OPERATION)).to(
+                from("direct:decrement").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DECREMENT)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:destroy").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DESTROY_OPERATION)).to(
+                from("direct:destroy").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DESTROY)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
                 
-                from("direct:compareAndSet").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.COMPARE_AND_SET_OPERATION)).to(
+                from("direct:compareAndSet").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.COMPARE_AND_SET)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
               
-                from("direct:getAndAdd").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_AND_ADD_OPERATION)).to(
+                from("direct:getAndAdd").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET_AND_ADD)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.ATOMICNUMBER_PREFIX));
 
-                from("direct:setWithOperationNumber").toF("hazelcast-%sfoo?operation=%s", HazelcastConstants.ATOMICNUMBER_PREFIX, HazelcastConstants.SETVALUE_OPERATION);
+                from("direct:setWithOperationNumber").toF("hazelcast-%sfoo?operation=%s", HazelcastConstants.ATOMICNUMBER_PREFIX, HazelcastOperation.SET_VALUE);
                 from("direct:setWithOperationName").toF("hazelcast-%sfoo?operation=setvalue", HazelcastConstants.ATOMICNUMBER_PREFIX);
 
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListProducerTest.java
index f5092c7..fd96669 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastListProducerTest.java
@@ -75,7 +75,7 @@ public class HazelcastListProducerTest extends HazelcastCamelTestSupport {
 
     @Test
     public void removeValue() throws InterruptedException {
-        template.sendBody("direct:removevalue", "foo2");
+        template.sendBody("direct:removeValue", "foo2");
         verify(list).remove("foo2");
     }
 
@@ -95,13 +95,13 @@ public class HazelcastListProducerTest extends HazelcastCamelTestSupport {
 
     @Test
     public void removeValueWithIdx() {
-        template.sendBodyAndHeader("direct:removevalue", null, HazelcastConstants.OBJECT_POS, 1);
+        template.sendBodyAndHeader("direct:removeValue", null, HazelcastConstants.OBJECT_POS, 1);
         verify(list).remove(1);
     }
 
     @Test
     public void removeValueWithoutIdx() {
-        template.sendBody("direct:removevalue", "foo1");
+        template.sendBody("direct:removeValue", "foo1");
         verify(list).remove("foo1");
     }
     
@@ -116,7 +116,7 @@ public class HazelcastListProducerTest extends HazelcastCamelTestSupport {
         Collection t = new ArrayList();
         t.add("test1");
         t.add("test2");
-        template.sendBody("direct:addAll", t);
+        template.sendBody("direct:addall", t);
         verify(list).addAll(t);
     }
     
@@ -134,7 +134,7 @@ public class HazelcastListProducerTest extends HazelcastCamelTestSupport {
         Collection t = new ArrayList();
         t.add("test1");
         t.add("test2");
-        template.sendBody("direct:retainAll", t);
+        template.sendBody("direct:RETAIN_ALL", t);
         verify(list).retainAll(t);
     }
 
@@ -146,29 +146,29 @@ public class HazelcastListProducerTest extends HazelcastCamelTestSupport {
 
                 from("direct:addInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
 
-                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
+                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
 
-                from("direct:set").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.SETVALUE_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
+                from("direct:set").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.SET_VALUE)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
 
-                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX)
+                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX)
                         .to("seda:out");
 
-                from("direct:removevalue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVEVALUE_OPERATION)).to(
+                from("direct:removeValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_VALUE)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX));
-                
-                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CLEAR_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
 
-                from("direct:addAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_ALL_OPERATION)).to(
+                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CLEAR)).toF("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX);
+
+                from("direct:addall").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX));
-                
-                from("direct:removeAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVE_ALL_OPERATION)).to(
+
+                from("direct:removeAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX));
-                
-                from("direct:retainAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.RETAIN_ALL_OPERATION)).to(
+
+                from("direct:RETAIN_ALL").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.RETAIN_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.LIST_PREFIX));
-                
-                from("direct:addWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.LIST_PREFIX, HazelcastConstants.ADD_OPERATION);
-                from("direct:addWithOperationName").toF("hazelcast-%sbar?operation=add", HazelcastConstants.LIST_PREFIX);
+
+                from("direct:addWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.LIST_PREFIX, HazelcastOperation.ADD);
+                from("direct:addWithOperationName").toF("hazelcast-%sbar?operation=ADD", HazelcastConstants.LIST_PREFIX);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java
index 91600c8..f20ec12 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapProducerTest.java
@@ -149,7 +149,7 @@ public class HazelcastMapProducerTest extends HazelcastCamelTestSupport implemen
         String sql = "bar > 1000";
 
         when(map.values(any(SqlPredicate.class))).thenReturn(Arrays.<Object>asList(new Dummy("beta", 2000), new Dummy("gamma", 3000)));
-        template.sendBodyAndHeader("direct:query", null, HazelcastConstants.QUERY, sql);
+        template.sendBodyAndHeader("direct:queue", null, HazelcastConstants.QUERY, sql);
         verify(map).values(any(SqlPredicate.class));
 
         Collection<?> b1 = consumer.receiveBody("seda:out", 5000, Collection.class);
@@ -161,7 +161,7 @@ public class HazelcastMapProducerTest extends HazelcastCamelTestSupport implemen
     @Test
     public void testEmptyQuery() {
         when(map.values()).thenReturn(Arrays.<Object>asList(new Dummy("beta", 2000), new Dummy("gamma", 3000), new Dummy("delta", 4000)));
-        template.sendBody("direct:query", null);
+        template.sendBody("direct:queue", null);
         verify(map).values();
 
         Collection<?> b1 = consumer.receiveBody("seda:out", 5000, Collection.class);
@@ -256,42 +256,42 @@ public class HazelcastMapProducerTest extends HazelcastCamelTestSupport implemen
 
                 from("direct:putInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
 
-                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUT_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
-                
-                from("direct:putIfAbsent").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUT_IF_ABSENT_OPERATION))
+                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUT)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
+
+                from("direct:putIfAbsent").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUT_IF_ABSENT))
                          .to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
 
-                from("direct:update").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.UPDATE_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
+                from("direct:update").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.UPDATE)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
 
-                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
+                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
 
-                from("direct:getAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_ALL_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
+                from("direct:getAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET_ALL)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
-                
-                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DELETE_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
 
-                from("direct:query").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.QUERY_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
+                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DELETE)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
+
+                from("direct:queue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.QUERY)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
 
-                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CLEAR_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
- 
-                from("direct:evict").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.EVICT_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
+                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CLEAR)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX));
+
+                from("direct:evict").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.EVICT)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
 
-                from("direct:evictAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.EVICT_ALL_OPERATION)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
+                from("direct:evictAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.EVICT_ALL)).to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
-                
-                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_KEY_OPERATION))
+
+                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_KEY))
                         .to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
-                
-                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_VALUE_OPERATION))
+
+                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_VALUE))
                         .to(String.format("hazelcast-%sfoo", HazelcastConstants.MAP_PREFIX))
                         .to("seda:out");
-                
-                from("direct:putWithOperationNumber").toF("hazelcast-%sfoo?operation=%s", HazelcastConstants.MAP_PREFIX, HazelcastConstants.PUT_OPERATION);
-                from("direct:putWithOperationName").toF("hazelcast-%sfoo?operation=put", HazelcastConstants.MAP_PREFIX);
+
+                from("direct:putWithOperationNumber").toF("hazelcast-%sfoo?operation=%s", HazelcastConstants.MAP_PREFIX, HazelcastOperation.PUT);
+                from("direct:putWithOperationName").toF("hazelcast-%sfoo?operation=PUT", HazelcastConstants.MAP_PREFIX);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java
index 151980d..716870e 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMultimapProducerTest.java
@@ -75,7 +75,7 @@ public class HazelcastMultimapProducerTest extends HazelcastCamelTestSupport {
 
     @Test
     public void testRemoveValue() {
-        template.sendBodyAndHeader("direct:removevalue", "my-foo", HazelcastConstants.OBJECT_ID, "4711");
+        template.sendBodyAndHeader("direct:removeValue", "my-foo", HazelcastConstants.OBJECT_ID, "4711");
         verify(map).remove("4711", "my-foo");
     }
 
@@ -142,31 +142,31 @@ public class HazelcastMultimapProducerTest extends HazelcastCamelTestSupport {
 
                 from("direct:putInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
 
-                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUT_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
+                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUT)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
 
-                from("direct:removevalue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVEVALUE_OPERATION)).to(
+                from("direct:removeValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_VALUE)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
 
-                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX))
+                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX))
                         .to("seda:out");
 
-                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DELETE_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
+                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DELETE)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
 
-                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CLEAR_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
+                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CLEAR)).to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
                 
-                from("direct:valueCount").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.VALUE_COUNT_OPERATION))
+                from("direct:valueCount").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.VALUE_COUNT))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX));
                 
-                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_KEY_OPERATION))
+                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_KEY))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX))
                         .to("seda:out");
                 
-                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_VALUE_OPERATION))
+                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_VALUE))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.MULTIMAP_PREFIX))
                         .to("seda:out");
                 
-                from("direct:putWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.MULTIMAP_PREFIX, HazelcastConstants.PUT_OPERATION);
-                from("direct:putWithOperationName").toF("hazelcast-%sbar?operation=put", HazelcastConstants.MULTIMAP_PREFIX);
+                from("direct:putWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.MULTIMAP_PREFIX, HazelcastOperation.PUT);
+                from("direct:putWithOperationName").toF("hazelcast-%sbar?operation=PUT", HazelcastConstants.MULTIMAP_PREFIX);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueProducerTest.java
index 4e0504f..b7c79a8 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastQueueProducerTest.java
@@ -95,13 +95,13 @@ public class HazelcastQueueProducerTest extends HazelcastCamelTestSupport {
 
     @Test
     public void removeSpecifiedValue() throws InterruptedException {
-        template.sendBody("direct:removevalue", "foo2");
+        template.sendBody("direct:removeValue", "foo2");
         verify(queue).remove("foo2");
     }
 
     @Test
     public void removeValue() {
-        template.sendBody("direct:removevalue", null);
+        template.sendBody("direct:removeValue", null);
         verify(queue).remove();
     }
 
@@ -124,7 +124,7 @@ public class HazelcastQueueProducerTest extends HazelcastCamelTestSupport {
     @Test
     public void remainingCapacity() throws InterruptedException {
         when(queue.remainingCapacity()).thenReturn(10);
-        int answer = template.requestBody("direct:remainingCapacity", null, Integer.class);
+        int answer = template.requestBody("direct:REMAINING_CAPACITY", null, Integer.class);
         verify(queue).remainingCapacity();
         assertEquals(10, answer);
     }
@@ -149,28 +149,28 @@ public class HazelcastQueueProducerTest extends HazelcastCamelTestSupport {
 
                 from("direct:putInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUT_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUT)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:offer").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.OFFER_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:offer").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.OFFER)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:poll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.POLL_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:poll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.POLL)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:peek").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PEEK_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:peek").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PEEK)).to(String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:removevalue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVEVALUE_OPERATION)).to(
+                from("direct:removeValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_VALUE)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
 
-                from("direct:remainingCapacity").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMAINING_CAPACITY_OPERATION)).to(
+                from("direct:REMAINING_CAPACITY").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMAINING_CAPACITY)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
                 
-                from("direct:drainTo").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DRAIN_TO_OPERATION)).to(
+                from("direct:drainTo").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DRAIN_TO)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.QUEUE_PREFIX));
                 
-                from("direct:putWithOperationNumber").toF(String.format("hazelcast-%sbar?operation=%s", HazelcastConstants.QUEUE_PREFIX, HazelcastConstants.PUT_OPERATION));
+                from("direct:putWithOperationNumber").toF(String.format("hazelcast-%sbar?operation=%s", HazelcastConstants.QUEUE_PREFIX, HazelcastOperation.PUT));
 
-                from("direct:putWithOperationName").toF(String.format("hazelcast-%sbar?operation=put", HazelcastConstants.QUEUE_PREFIX));
+                from("direct:putWithOperationName").toF(String.format("hazelcast-%sbar?operation=PUT", HazelcastConstants.QUEUE_PREFIX));
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicProducerTest.java
index 88ee672..911707c 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReliableTopicProducerTest.java
@@ -72,7 +72,7 @@ public class HazelcastReliableTopicProducerTest extends HazelcastCamelTestSuppor
 
                 from("direct:publishInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sbar?reliable=true", HazelcastConstants.TOPIC_PREFIX));
 
-                from("direct:publish").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUBLISH_OPERATION)).to(String.format("hazelcast-%sbar?reliable=true", 
+                from("direct:publish").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUBLISH)).to(String.format("hazelcast-%sbar?reliable=true",
                     HazelcastConstants.TOPIC_PREFIX));
             }
         };

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerTest.java
index 5484643..d37ee9a 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastReplicatedmapProducerTest.java
@@ -130,27 +130,27 @@ public class HazelcastReplicatedmapProducerTest extends HazelcastCamelTestSuppor
 
                 from("direct:putInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX));
 
-                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUT_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX));
+                from("direct:put").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUT)).to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX));
 
-                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX))
+                from("direct:get").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.GET)).to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX))
                         .to("seda:out");
 
-                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.DELETE_OPERATION))
+                from("direct:delete").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.DELETE))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX));
 
-                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CLEAR_OPERATION))
+                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CLEAR))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX));
                 
-                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_KEY_OPERATION))
+                from("direct:containsKey").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_KEY))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX))
                         .to("seda:out");
         
-                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CONTAINS_VALUE_OPERATION))
+                from("direct:containsValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CONTAINS_VALUE))
                         .to(String.format("hazelcast-%sbar", HazelcastConstants.REPLICATEDMAP_PREFIX))
                         .to("seda:out");
                 
-                from("direct:putWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.REPLICATEDMAP_PREFIX, HazelcastConstants.PUT_OPERATION);
-                from("direct:putWithOperationName").toF("hazelcast-%sbar?operation=put", HazelcastConstants.REPLICATEDMAP_PREFIX);
+                from("direct:putWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.REPLICATEDMAP_PREFIX, HazelcastOperation.PUT);
+                from("direct:putWithOperationName").toF("hazelcast-%sbar?operation=PUT", HazelcastConstants.REPLICATEDMAP_PREFIX);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastRingbufferProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastRingbufferProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastRingbufferProducerTest.java
index b389175..4180245 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastRingbufferProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastRingbufferProducerTest.java
@@ -46,14 +46,14 @@ public class HazelcastRingbufferProducerTest extends HazelcastCamelTestSupport {
     @Test
     public void testReadHead() throws InterruptedException {
         when(ringbuffer.readOne(Matchers.anyLong())).thenReturn("pippo");
-        Object result = template.requestBody("direct:readonceHead", 12L, String.class);
+        Object result = template.requestBody("direct:READ_ONCE_HEAD", 12L, String.class);
         assertEquals("pippo", result);
     }
     
     @Test
     public void testReadTail() throws InterruptedException {
         when(ringbuffer.readOne(Matchers.anyLong())).thenReturn("pippo");
-        Object result = template.requestBody("direct:readonceTail", 12L, String.class);
+        Object result = template.requestBody("direct:READ_ONCE_TAIL", 12L, String.class);
         assertEquals("pippo", result);
     }
     
@@ -74,7 +74,7 @@ public class HazelcastRingbufferProducerTest extends HazelcastCamelTestSupport {
     @Test
     public void testRemainingCapacity() throws InterruptedException {
         when(ringbuffer.remainingCapacity()).thenReturn(2L);
-        Object result = template.requestBody("direct:remainingCapacity", "", Long.class);
+        Object result = template.requestBody("direct:REMAINING_CAPACITY", "", Long.class);
         assertEquals(2L, result);
     }
 
@@ -84,19 +84,19 @@ public class HazelcastRingbufferProducerTest extends HazelcastCamelTestSupport {
             @Override
             public void configure() throws Exception {
               
-                from("direct:readonceHead").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.READ_ONCE_HEAD_OPERATION)).to(
+                from("direct:READ_ONCE_HEAD").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.READ_ONCE_HEAD)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.RINGBUFFER_PREFIX));
                 
-                from("direct:readonceTail").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.READ_ONCE_TAIL_OPERATION)).to(
+                from("direct:READ_ONCE_TAIL").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.READ_ONCE_TAIL)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.RINGBUFFER_PREFIX));
                 
-                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION)).to(
+                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.RINGBUFFER_PREFIX));
                 
-                from("direct:capacity").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.GET_CAPACITY_OPERATION)).to(
+                from("direct:capacity").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CAPACITY)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.RINGBUFFER_PREFIX));
                 
-                from("direct:remainingCapacity").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMAINING_CAPACITY_OPERATION)).to(
+                from("direct:REMAINING_CAPACITY").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMAINING_CAPACITY)).to(
                         String.format("hazelcast-%sfoo", HazelcastConstants.RINGBUFFER_PREFIX));
 
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSetProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSetProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSetProducerTest.java
index ec21e2e..b4150ff 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSetProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastSetProducerTest.java
@@ -75,7 +75,7 @@ public class HazelcastSetProducerTest extends HazelcastCamelTestSupport {
 
     @Test
     public void removeValue() throws InterruptedException {
-        template.sendBody("direct:removevalue", "foo2");
+        template.sendBody("direct:removeValue", "foo2");
         verify(set).remove("foo2");
     }
     
@@ -90,7 +90,7 @@ public class HazelcastSetProducerTest extends HazelcastCamelTestSupport {
         Collection t = new ArrayList();
         t.add("test1");
         t.add("test2");
-        template.sendBody("direct:addAll", t);
+        template.sendBody("direct:addall", t);
         verify(set).addAll(t);
     }
     
@@ -108,7 +108,7 @@ public class HazelcastSetProducerTest extends HazelcastCamelTestSupport {
         Collection t = new ArrayList();
         t.add("test1");
         t.add("test2");
-        template.sendBody("direct:retainAll", t);
+        template.sendBody("direct:RETAIN_ALL", t);
         verify(set).retainAll(t);
     }
 
@@ -120,24 +120,24 @@ public class HazelcastSetProducerTest extends HazelcastCamelTestSupport {
 
                 from("direct:addInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).toF("hazelcast-%sbar", HazelcastConstants.SET_PREFIX);
 
-                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.SET_PREFIX);
+                from("direct:add").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD)).toF("hazelcast-%sbar", HazelcastConstants.SET_PREFIX);
 
-                from("direct:removevalue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVEVALUE_OPERATION)).to(
+                from("direct:removeValue").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_VALUE)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.SET_PREFIX));
                 
-                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.CLEAR_OPERATION)).toF("hazelcast-%sbar", HazelcastConstants.SET_PREFIX);
+                from("direct:clear").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.CLEAR)).toF("hazelcast-%sbar", HazelcastConstants.SET_PREFIX);
 
-                from("direct:addAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.ADD_ALL_OPERATION)).to(
+                from("direct:addall").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.ADD_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.SET_PREFIX));
                 
-                from("direct:removeAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.REMOVE_ALL_OPERATION)).to(
+                from("direct:removeAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.REMOVE_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.SET_PREFIX));
                 
-                from("direct:retainAll").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.RETAIN_ALL_OPERATION)).to(
+                from("direct:RETAIN_ALL").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.RETAIN_ALL)).to(
                         String.format("hazelcast-%sbar", HazelcastConstants.SET_PREFIX));
                 
-                from("direct:addWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.SET_PREFIX, HazelcastConstants.ADD_OPERATION);
-                from("direct:addWithOperationName").toF("hazelcast-%sbar?operation=add", HazelcastConstants.SET_PREFIX);
+                from("direct:addWithOperationNumber").toF("hazelcast-%sbar?operation=%s", HazelcastConstants.SET_PREFIX, HazelcastOperation.ADD);
+                from("direct:addWithOperationName").toF("hazelcast-%sbar?operation=ADD", HazelcastConstants.SET_PREFIX);
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastTopicProducerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastTopicProducerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastTopicProducerTest.java
index dff2014..b4fc18c 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastTopicProducerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastTopicProducerTest.java
@@ -72,7 +72,7 @@ public class HazelcastTopicProducerTest extends HazelcastCamelTestSupport {
 
                 from("direct:publishInvalid").setHeader(HazelcastConstants.OPERATION, constant("bogus")).to(String.format("hazelcast-%sbar", HazelcastConstants.TOPIC_PREFIX));
 
-                from("direct:publish").setHeader(HazelcastConstants.OPERATION, constant(HazelcastConstants.PUBLISH_OPERATION)).to(String.format("hazelcast-%sbar", HazelcastConstants.TOPIC_PREFIX));
+                from("direct:publish").setHeader(HazelcastConstants.OPERATION, constant(HazelcastOperation.PUBLISH)).to(String.format("hazelcast-%sbar", HazelcastConstants.TOPIC_PREFIX));
             }
         };
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicyMain.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicyMain.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicyMain.java
index 8f50694..d204878 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicyMain.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/policy/HazelcastRoutePolicyMain.java
@@ -37,7 +37,7 @@ public final class HazelcastRoutePolicyMain {
                 policy.setLockValue(args[1]);
                 policy.setTryLockTimeout(5, TimeUnit.SECONDS);
 
-                from("file:///tmp/camel?delete=true")
+                from("file:///tmp/camel?DELETE=true")
                     .routeId(args[1])
                     .routePolicy(policy)
                     .setHeader("HazelcastRouteID", constant(args[1]))

http://git-wip-us.apache.org/repos/asf/camel/blob/f5296eb8/components/camel-hazelcast/src/test/java/org/apache/camel/processor/idempotent/hazelcast/HazelcastIdempotentRepositoryTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/processor/idempotent/hazelcast/HazelcastIdempotentRepositoryTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/processor/idempotent/hazelcast/HazelcastIdempotentRepositoryTest.java
index 8d09d87..17473e2 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/processor/idempotent/hazelcast/HazelcastIdempotentRepositoryTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/processor/idempotent/hazelcast/HazelcastIdempotentRepositoryTest.java
@@ -51,22 +51,22 @@ public class HazelcastIdempotentRepositoryTest extends CamelTestSupport {
 
     @Test
     public void testAdd() throws Exception {
-        // add first key
+        // ADD first key
         assertTrue(repo.add(key01));
         assertTrue(cache.containsKey(key01));
 
-        // try to add the same key again
+        // try to ADD the same key again
         assertFalse(repo.add(key01));
         assertEquals(1, cache.size());
 
-        // try to add an other one
+        // try to ADD an other one
         assertTrue(repo.add(key02));
         assertEquals(2, cache.size());
     }
 
     @Test
     public void testConfirm() throws Exception {
-        // add first key and confirm
+        // ADD first key and confirm
         assertTrue(repo.add(key01));
         assertTrue(repo.confirm(key01));
 
@@ -78,7 +78,7 @@ public class HazelcastIdempotentRepositoryTest extends CamelTestSupport {
     public void testContains() throws Exception {
         assertFalse(repo.contains(key01));
 
-        // add key and check again
+        // ADD key and check again
         assertTrue(repo.add(key01));
         assertTrue(repo.contains(key01));
 
@@ -86,19 +86,19 @@ public class HazelcastIdempotentRepositoryTest extends CamelTestSupport {
 
     @Test
     public void testRemove() throws Exception {
-        // add key to remove
+        // ADD key to remove
         assertTrue(repo.add(key01));
         assertTrue(repo.add(key02));
         assertEquals(2, cache.size());
 
-        // clear repo
+        // CLEAR repo
         repo.clear();
         assertEquals(0, cache.size());
     }
     
     @Test
     public void testClear() throws Exception {
-        // add key to remove
+        // ADD key to remove
         assertTrue(repo.add(key01));
         assertEquals(1, cache.size());
 


Mime
View raw message