### Question:
ActionRef { @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final ActionRef other = (ActionRef) obj; return other.cancel == cancel && other.path.equals(path) && other.refs.equals(refs) && (!unique || other.id.apply(Identifiable.class).equals(id.apply(Identifiable.class))); } 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 testEquals() { final FeaturableModel featurable = new FeaturableModel(services, setup); assertEquals(actionRef1, actionRef1); assertEquals(actionRef1, new ActionRef("path", !cancel, new ArrayList<ActionRef>())); assertEquals(actionRef2, actionRef2); assertEquals(actionRef2, new ActionRef("path2", cancel, Arrays.asList(actionRef1), model::getFeature)); assertEquals(new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature), new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature)); assertNotEquals(actionRef1, null); assertNotEquals(actionRef1, new Object()); assertNotEquals(actionRef1, actionRef2); assertNotEquals(actionRef2, actionRef1); assertNotEquals(actionRef1, new ActionRef("", !cancel, new ArrayList<ActionRef>())); assertNotEquals(actionRef1, new ActionRef("path", cancel, new ArrayList<ActionRef>())); assertNotEquals(actionRef1, new ActionRef("path", cancel, Arrays.asList(actionRef1))); assertNotEquals(actionRef1, new ActionRef("path", !cancel, Arrays.asList(actionRef1))); assertNotEquals(new ActionRef("path2", cancel, Arrays.asList(actionRef1), featurable::getFeature), new ActionRef("path2", cancel, Arrays.asList(actionRef1), new FeaturableModel(services, setup)::getFeature)); }