Event { public static boolean containsTag(String in) { return tagPattern.matcher(in).find(); }  abstract byte[] getBody(); abstract Priority getPriority(); abstract long getTimestamp(); abstract long getNanos(); abstract String getHost(); abstract byte[] get(String attr); abstract void set(String attr, byte[] v); abstract Map<String, byte[]> getAttrs(); abstract void merge(Event e); abstract void hierarchicalMerge(String prefix, Event e); static boolean containsTag(String in); String escapeString(String in); Map<String, String> getEscapeMapping(String in); final static String A_SERVICE; final static String TAG_REGEX; final static Pattern tagPattern; }
@Test public void testContains() { assertTrue("Didn't find expected tag", Event.containsTag("/henry/%{test}")); assertTrue("Didn't find expected shorthand tag", Event .containsTag("/henry/%h")); assertFalse("Found non-existant tag", Event.containsTag("/henry/test")); }