@Test public void unsatisfiedExpressions_shouldHandleAAndB() throws Exception { String[] test = { "href", "label" }; Model holder = new Model(); holder.addAttribute("href", "okay"); Assert.assertTrue(AttributeHolderUtil.unsatisfiedExpressions(holder, test).contains(test[1])); holder.addAttribute("label", "dokay"); Assert.assertEquals(0, AttributeHolderUtil.unsatisfiedExpressions(holder, test).size()); }
public static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions) { List<String> failed = new ArrayList<String>(); for (String expression : expressions) if (!satisfied(attributeHolder, expression)) failed.add(expression); return failed; }
AttributeHolderUtil { public static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions) { List<String> failed = new ArrayList<String>(); for (String expression : expressions) if (!satisfied(attributeHolder, expression)) failed.add(expression); return failed; } }
AttributeHolderUtil { public static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions) { List<String> failed = new ArrayList<String>(); for (String expression : expressions) if (!satisfied(attributeHolder, expression)) failed.add(expression); return failed; }  }
AttributeHolderUtil { public static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions) { List<String> failed = new ArrayList<String>(); for (String expression : expressions) if (!satisfied(attributeHolder, expression)) failed.add(expression); return failed; }  static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions); }
AttributeHolderUtil { public static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions) { List<String> failed = new ArrayList<String>(); for (String expression : expressions) if (!satisfied(attributeHolder, expression)) failed.add(expression); return failed; }  static List<String> unsatisfiedExpressions(AttributeHolder attributeHolder, String[] expressions);  }