AllowedOperation { public void setItems(Map<String, Set<String>> items) { this.items = items; }  Map<String, Set<String>> getItems(); void setItems(Map<String, Set<String>> items); String getName(); void setName(String name); boolean isOperationAllowedOn(String opItemType, String opItemValue, MatchType matchType); @Override int hashCode(); @Override boolean equals(Object obj);  }
@SuppressWarnings("serial") @Test public void testSetItems() { AllowedOperation op = new AllowedOperation(); Set<String> item = new HashSet<String>() { { add("hoge"); } }; Map<String, Set<String>> items = new HashMap<String, Set<String>>() { { put("key", item); } }; op.setItems(items); Map<String, Set<String>> gottenItems = op.getItems(); assertEquals(gottenItems, items); }