XMLRouterConfigService test added.
[xmlrouter] / impl / src / test / java / org / wamblee / xmlrouter / impl / XMLRouterFunctionTest.java
index 5d84107255f75ada0bf3702282f28239c1c9ef4f..d7c504e97555e15f98276deb20dcac9db7f9c61a 100644 (file)
@@ -53,7 +53,7 @@ public class XMLRouterFunctionTest {
         EventListener logListener = new LoggingEventListener(Level.INFO);
         listener = spy(logListener);
         routerService = new XMLRouter(new SystemClock(), config, listener);
-        configService = new XMLRouterConfigService(config);
+        configService = new XMLRouterConfigService("app", config);
 
         source1 = mock(DOMSource.class);
         source2 = mock(DOMSource.class);
@@ -63,7 +63,8 @@ public class XMLRouterFunctionTest {
         DocumentType type = mock(DocumentType.class);
         when(type.isInstance(any(DOMSource.class))).thenReturn(true);
         when(type.getName()).thenReturn(aType);
-        RouterConfig routerConfig = configService.emptyConfig();
+        when(type.getId()).thenReturn(new Id<DocumentType>(aType));
+        RouterConfig routerConfig = configService.emptyConfig("app");
         routerConfig.documentTypeConfig().add(type);
         return routerConfig;
     }