@Test public void equalsTest () { Container firstEqualContainer = new EqualityTestContainer("containerName", 0); Container secondEqualContainer = new EqualityTestContainer("containerName", 0); Container unequalContainer = new EqualityTestContainer("containerName", 1); assertEquals(firstEqualContainer, secondEqualContainer); assertFalse(firstEqualContainer.equals(unequalContainer)); assertFalse(secondEqualContainer.equals(unequalContainer)); assertFalse(firstEqualContainer.equals("A string")); assertFalse(firstEqualContainer.equals(null)); }
@Override public boolean equals (Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } Container other = (Container) o; return this.getIdentity() == other.getIdentity(); }
Container implements ExperimentalObject { @Override public boolean equals (Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } Container other = (Container) o; return this.getIdentity() == other.getIdentity(); } }
Container implements ExperimentalObject { @Override public boolean equals (Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } Container other = (Container) o; return this.getIdentity() == other.getIdentity(); }  }
Container implements ExperimentalObject { @Override public boolean equals (Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } Container other = (Container) o; return this.getIdentity() == other.getIdentity(); }  Map<String, Boolean> getShellCapabilities(); @JsonIgnore Map<String, String> getDataDogTags(); @Override boolean canExperiment(); @JsonIgnore abstract Platform getPlatform(); boolean eligibleForExperiments(); Experiment createExperiment(); @Override boolean equals(Object o); @Override int hashCode(); long getIdentity(); @Override String toString(); ContainerHealth getContainerHealth(ExperimentType experimentType); Experiment createExperiment(String experimentMethod); void startExperiment(Experiment experiment); abstract String getSimpleName(); abstract String getAggregationIdentifier(); String getContainerType(); @JsonIgnore Duration getMinimumSelfHealingInterval(); @JsonIgnore abstract DataDogIdentifier getDataDogIdentifier(); boolean compareUniqueIdentifier(String uniqueIdentifier); void setMappedDiagnosticContext(); void clearMappedDiagnosticContext(); @JsonIgnore List<Method> getExperimentMethods(); @SuppressWarnings("unchecked") Runnable recycleCattle(); boolean isCattle(); boolean supportsShellBasedExperiments(); @SuppressWarnings("unchecked") ShellOutput runCommand(String command); @JsonIgnore Boolean isContainerRecycled(); @SuppressWarnings("unchecked") String runScript(Script script); Instant getExperimentStartTime(); Collection<String> getKnownMissingCapabilities(); void clearExperiment(); boolean supportsExperimentScope(ExperimentScope experimentScope); }
Container implements ExperimentalObject { @Override public boolean equals (Object o) { if (o == null || o.getClass() != this.getClass()) { return false; } Container other = (Container) o; return this.getIdentity() == other.getIdentity(); }  Map<String, Boolean> getShellCapabilities(); @JsonIgnore Map<String, String> getDataDogTags(); @Override boolean canExperiment(); @JsonIgnore abstract Platform getPlatform(); boolean eligibleForExperiments(); Experiment createExperiment(); @Override boolean equals(Object o); @Override int hashCode(); long getIdentity(); @Override String toString(); ContainerHealth getContainerHealth(ExperimentType experimentType); Experiment createExperiment(String experimentMethod); void startExperiment(Experiment experiment); abstract String getSimpleName(); abstract String getAggregationIdentifier(); String getContainerType(); @JsonIgnore Duration getMinimumSelfHealingInterval(); @JsonIgnore abstract DataDogIdentifier getDataDogIdentifier(); boolean compareUniqueIdentifier(String uniqueIdentifier); void setMappedDiagnosticContext(); void clearMappedDiagnosticContext(); @JsonIgnore List<Method> getExperimentMethods(); @SuppressWarnings("unchecked") Runnable recycleCattle(); boolean isCattle(); boolean supportsShellBasedExperiments(); @SuppressWarnings("unchecked") ShellOutput runCommand(String command); @JsonIgnore Boolean isContainerRecycled(); @SuppressWarnings("unchecked") String runScript(Script script); Instant getExperimentStartTime(); Collection<String> getKnownMissingCapabilities(); void clearExperiment(); boolean supportsExperimentScope(ExperimentScope experimentScope);  }