when(transformation.getToType()).thenReturn("bla");
when(transformation.transform(same(source1))).thenReturn(source2);
routerConfig.transformationConfig().add(transformation);
when(transformation.getToType()).thenReturn("bla");
when(transformation.transform(same(source1))).thenReturn(source2);
routerConfig.transformationConfig().add(transformation);
Destination destination = mock(Destination.class);
when(
destination.chooseFromTargetTypes((Collection<String>) anyObject()))
Destination destination = mock(Destination.class);
when(
destination.chooseFromTargetTypes((Collection<String>) anyObject()))
when(
destination.chooseFromTargetTypes((Collection<String>) anyObject()))
.thenReturn(Arrays.asList("bla", "bla2"));
when(
destination.chooseFromTargetTypes((Collection<String>) anyObject()))
.thenReturn(Arrays.asList("bla", "bla2"));
Transformation transformation = createTransformation("any", "other",
source1, source2);
routerConfig.transformationConfig().add(transformation);
Transformation transformation = createTransformation("any", "other",
source1, source2);
routerConfig.transformationConfig().add(transformation);
router.publish("source", source1);
verify(listener, times(2)).delivered(any(EventInfo.class),
router.publish("source", source1);
verify(listener, times(2)).delivered(any(EventInfo.class),
Transformation t2 = createTransformation("intermediate", "other",
source2, source3);
routerConfig.transformationConfig().add(t2);
Transformation t2 = createTransformation("intermediate", "other",
source2, source3);
routerConfig.transformationConfig().add(t2);
router.publish("source", source1);
verify(listener).delivered(any(EventInfo.class),
router.publish("source", source1);
verify(listener).delivered(any(EventInfo.class),