### Question:
CellarSupport { protected boolean wildCardMatch(String item, String pattern) { if (item == null || pattern == null) { return false; } pattern = pattern.replace("*", ".*"); Pattern p = Pattern.compile(pattern); Matcher m = p.matcher(item); return m.matches(); }  void switchListEntry(String listType, String group, String category, EventType type, String entry); Set<String> getListEntries(String listType, String group, String category, EventType type); Set<String> getListEntries(String listType, Collection<String> groups, String category, EventType type); Set<String> getListEntries(String listType, Group group, String category, EventType type); Boolean isAllowed(Group group, String category, String event, EventType type); ConfigurationAdmin getConfigurationAdmin(); void setConfigurationAdmin(ConfigurationAdmin configurationAdmin); ClusterManager getClusterManager(); void setClusterManager(ClusterManager clusterManager); GroupManager getGroupManager(); void setGroupManager(GroupManager groupManager);  }### Answer:
@Test public void testBundleWildcard() { CellarSupport support = new CellarSupport(); boolean test = support.wildCardMatch("this_is_a_test/1.0", "*"); assertTrue(test); test = support.wildCardMatch("foo_bar", "foo*"); assertTrue(test); test = support.wildCardMatch("foo_bar", "*bar"); assertTrue(test); test = support.wildCardMatch("foo_bar", "hell*"); assertFalse(test); }