First version after introduction of meaningful ids and Identifiable interface.
[xmlrouter] / impl / src / test / java / org / wamblee / xmlrouter / impl / XMLRouterFunctionTest.java
index 46e36c0c4bdb4c86a67f07c067e512b889a35151..5d84107255f75ada0bf3702282f28239c1c9ef4f 100644 (file)
@@ -27,6 +27,7 @@ import javax.xml.transform.dom.DOMSource;
 import org.junit.Before;
 import org.junit.Test;
 import org.wamblee.general.SystemClock;
+import org.wamblee.xmlrouter.common.Id;
 import org.wamblee.xmlrouter.config.DocumentType;
 import org.wamblee.xmlrouter.config.RouterConfig;
 import org.wamblee.xmlrouter.config.Transformation;
@@ -71,7 +72,8 @@ public class XMLRouterFunctionTest {
     public void testOneTransformationOneDestination() {
         RouterConfig routerConfig = registerDocumentType("any");
         Transformation transformation = mock(Transformation.class);
-        when(transformation.getName()).thenReturn("trans");
+        when(transformation.getId())
+            .thenReturn(new Id<Transformation>("trans"));
         when(transformation.getFromType()).thenReturn("any");
         when(transformation.getToType()).thenReturn("bla");
         when(transformation.transform(same(source1))).thenReturn(source2);
@@ -89,7 +91,7 @@ public class XMLRouterFunctionTest {
         when(destination.receive(any(DOMSource.class))).thenReturn(true);
         routerService.publish("bla", source1);
         verify(listener).delivered(any(EventInfo.class),
-            anyListOf(Transformation.class), anyLong(), anyString(), eq(true));
+            anyListOf(Transformation.class), anyString(), eq(true));
 
         verify(transformation).transform(source1);
         verify(destination).receive(same(source2));