PartialTextMatchRule extends AbstractRule { public static Rule getRule(final String field, final String value) { return new PartialTextMatchRule(field, value); } private  PartialTextMatchRule(final String field, final String value); static Rule getRule(final String field, final String value); static Rule getRule(final Stack<Object> stack); @SuppressWarnings({"rawtypes", "unchecked"}) boolean evaluate(final LogData event, Map matches);  }
@Test public void test1() { Stack<Object> stack = new Stack<>(); stack.push("Hello"); try { PartialTextMatchRule.getRule(stack); Assert.fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException ignored) { } }
@Test public void test2() { Stack<Object> stack = new Stack<>(); stack.push("Hello"); stack.push("World"); try { PartialTextMatchRule.getRule(stack); Assert.fail("Should have thrown IllegalArgumentException"); } catch (IllegalArgumentException ignored) { } }