id prefixes are now done at the very last moment instead of when an item is added.
[xmlrouter] / impl / src / test / java / org / wamblee / xmlrouter / impl / ConfigImplTest.java
index aa197eaf54274e44fee6d9ba87555d0381833735..85860122b71c75bcac18fb61a6b469e000ffb780 100644 (file)
@@ -55,7 +55,7 @@ public class ConfigImplTest {
 
     public static final class MyTypeConfig extends ConfigImpl<MyType> {
         public MyTypeConfig(Id<Config> aId) {
-            super(aId);
+            super(MyType.class, aId);
         }
 
         public MyTypeConfig(MyTypeConfig aConfig) {
@@ -121,22 +121,11 @@ public class ConfigImplTest {
     @Test
     public void testEquals() {
 
-        Config<MyType> config1 = new ConfigImpl<MyType>(new Id<Config>(
-            CONFIG_TYPE)) {
-            @Override
-            public MyType wrap(String aPrefix, MyType aT) {
-                return new MyTypeWrapper(aPrefix, aT);
-            }
-        };
+        Config<MyType> config1 = new MyTypeConfig(new Id<Config>(CONFIG_TYPE));
         assertFalse(config1.equals(null));
         assertFalse(config1.equals("hello"));
-        Config<MyType> config2 = new ConfigImpl<MyType>(new Id<Config>(
-            CONFIG_TYPE)) {
-            @Override
-            public MyType wrap(String aPrefix, MyType aT) {
-                return new MyTypeWrapper(aPrefix, aT);
-            }
-        };
+        Config<MyType> config2 = new MyTypeConfig(new Id<Config>(CONFIG_TYPE));
+
         assertEquals(config1, config2);
         assertEquals(config1.hashCode(), config2.hashCode());