You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2015/06/11 17:18:25 UTC
[5/5] camel git commit: CAMEL-8856: Add Eviction Map Consumer Test
CAMEL-8856: Add Eviction Map Consumer Test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3faef3f8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3faef3f8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3faef3f8
Branch: refs/heads/master
Commit: 3faef3f8a662992ccbb350bc801e8e9d8aecf252
Parents: 26e09e1
Author: Andrea Cosentino <an...@gmail.com>
Authored: Thu Jun 11 11:18:33 2015 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Thu Jun 11 17:14:37 2015 +0200
----------------------------------------------------------------------
.../component/hazelcast/HazelcastMapConsumerTest.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/3faef3f8/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java
index 71083ba..fc6748a 100644
--- a/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java
+++ b/components/camel-hazelcast/src/test/java/org/apache/camel/component/hazelcast/HazelcastMapConsumerTest.java
@@ -96,6 +96,20 @@ public class HazelcastMapConsumerTest extends HazelcastCamelTestSupport {
this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.UPDATED);
}
+
+ @Test
+ @SuppressWarnings("unchecked")
+ public void testEvict() throws InterruptedException {
+ MockEndpoint out = getMockEndpoint("mock:evicted");
+ out.expectedMessageCount(1);
+
+ EntryEvent<Object, Object> event = new EntryEvent<Object, Object>("foo", null, EntryEventType.EVICTED.getType(), "4711", "my-foo");
+ argument.getValue().entryEvicted(event);
+
+ assertMockEndpointsSatisfied(5000, TimeUnit.MILLISECONDS);
+
+ this.checkHeaders(out.getExchanges().get(0).getIn().getHeaders(), HazelcastConstants.EVICTED);
+ }
@Test
@SuppressWarnings("unchecked")