DefaultExtensionPlanAction implements ExtensionPlanAction { @Override public boolean equals(Object obj) { if (this == obj) { return true; } boolean equals; if (obj instanceof ExtensionPlanAction) { ExtensionPlanAction epa = (ExtensionPlanAction) obj; equals = this.extension.equals(epa.getExtension()) && Objects.equals(this.namespace, epa.getNamespace()); } else { equals = false; } return equals; } DefaultExtensionPlanAction(Extension extension, Extension rewrittenExtension,
        Collection<InstalledExtension> previousExtensions, Action action, String namespace, boolean dependency); @Override Extension getExtension(); @Override Extension getRewrittenExtension(); @Override @Deprecated InstalledExtension getPreviousExtension(); @Override Collection<InstalledExtension> getPreviousExtensions(); @Override Action getAction(); @Override String getNamespace(); @Override boolean isDependency(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }
@Test void equals() { TestExtension testExtension1 = new TestExtension(new ExtensionId("id"), "type"); TestExtension testExtension2 = new TestExtension(new ExtensionId("id2"), "type"); assertEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true)); assertEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension1, testExtension1, null, Action.INSTALL, "namespace", true)); assertEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.UNINSTALL, "namespace", true)); assertEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", false)); assertNotEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension2, testExtension2, null, Action.INSTALL, "namespace", true)); assertNotEquals( new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace", true), new DefaultExtensionPlanAction(testExtension1, testExtension2, null, Action.INSTALL, "namespace2", true)); }