Merge "BUG 3057 - notify added event source by topics created before"
[controller.git] / opendaylight / md-sal / messagebus-impl / src / test / java / org / opendaylight / controller / messagebus / app / impl / UtilTest.java
index a88c609a263317deb9ed4906893150f52390a219..7aebb8fbdd6ac14919c9b1c8d6d5ec8327559f5c 100644 (file)
@@ -25,30 +25,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaPath;
  */
 public class UtilTest {
 
-    @Test
-    public void testWildcardToRegex() throws Exception {
-        // empty wildcard string
-        createAndAssertRegex("", "^$");
-
-        // wildcard string is a char to be replaced
-        createAndAssertRegex("*", "^.*$");
-        createAndAssertRegex("?", "^.$");
-        final String relevantChars = "()[]$^.{}|\\";
-        for (final char c : relevantChars.toCharArray()) {
-            final char oneChar[] = {c};
-            final String wildcardStr = new String(oneChar);
-            final String expectedRegex = "^\\" + c + "$";
-            createAndAssertRegex(wildcardStr, expectedRegex);
-        }
-
-        // wildcard string consists of more chars
-        createAndAssertRegex("a", "^a$");
-        createAndAssertRegex("aBc", "^aBc$");
-        createAndAssertRegex("a1b2C34", "^a1b2C34$");
-        createAndAssertRegex("*?()[]$^.{}|\\X", "^.*.\\(\\)\\[\\]\\$\\^\\.\\{\\}\\|\\\\X$");
-        createAndAssertRegex("a*BB?37|42$", "^a.*BB.37\\|42\\$$");
-    }
-
     @Test
     public void testResultFor() throws Exception {
         {
@@ -105,10 +81,6 @@ public class UtilTest {
         }
     }
 
-    private static void createAndAssertRegex(final String wildcardStr, final String expectedRegex) {
-        assertEquals("Incorrect regex string.", expectedRegex, Util.wildcardToRegex(wildcardStr));
-    }
-
     private static List<SchemaPath> createSchemaPathList() {
         final QName qname1 = QName.create("urn:odl:xxx", "2015-01-01", "localName");
         final QName qname2 = QName.create("urn:odl:yyy", "2015-01-01", "localName");