### Question:
ActionRef { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (cancel ? 1231 : 1237); result = prime * result + path.hashCode(); result = prime * result + refs.hashCode(); if (unique) { result = prime * result + id.apply(Identifiable.class).hashCode(); } return result; } ActionRef(String path, boolean cancel, Collection<ActionRef> refs);  ActionRef(String path,
                     boolean cancel,
                     Collection<ActionRef> refs,
                     Function<Class<? extends Feature>, Feature> id); String getPath(); boolean hasCancel(); boolean isUnique(); Collection<ActionRef> getRefs(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test void testHashCode() { final ActionRef hash = actionRef1; final FeaturableModel featurable = new FeaturableModel(services, setup); assertHashEquals(hash, new ActionRef("path", !cancel, new ArrayList<ActionRef>())); assertHashEquals(actionRef2, actionRef2); assertHashEquals(actionRef2, new ActionRef("path2", cancel, Arrays.asList(actionRef1), model::getFeature)); assertHashEquals(new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature), new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature)); assertHashNotEquals(hash, new Object()); assertHashNotEquals(hash, actionRef2); assertHashNotEquals(actionRef2, hash); assertHashNotEquals(hash, new ActionRef("", !cancel, new ArrayList<ActionRef>())); assertHashNotEquals(hash, new ActionRef("path", cancel, new ArrayList<ActionRef>())); assertHashNotEquals(hash, new ActionRef("path", cancel, Arrays.asList(actionRef1))); assertHashNotEquals(hash, new ActionRef("path", !cancel, Arrays.asList(actionRef1))); assertHashNotEquals(new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature), new ActionRef("path2", cancel, Arrays.asList(actionRef1), new FeaturableModel(services, setup)::getFeature)); }