diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java index bdcd493e98..7770472299 100644 --- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java +++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/settings/RepositoryTest.java @@ -65,6 +65,18 @@ public class RepositoryTest extends ActiveMQTestBase { Assert.assertEquals("abd#", repo.getMatch("a.b.d")); } + @Test + public void testCacheWithWildcards() throws Throwable { + HierarchicalObjectRepository repo = new HierarchicalObjectRepository<>(); + + repo.addMatch("#", "root"); + Assert.assertEquals("root", repo.getMatch("b")); + + repo.addMatch("b", "leaf"); + Assert.assertEquals("leaf", repo.getMatch("b")); + } + + @Test public void testMatchingDocsCustomUnderscorDelimiter() throws Throwable { WildcardConfiguration wildcardConfiguration = new WildcardConfiguration();