RobotVersion implements Comparable<RobotVersion> { public boolean isNotEqualTo(final RobotVersion otherVersion) { return !isEqualTo(otherVersion); } RobotVersion(final int major, final int minor);  RobotVersion(final int major, final int minor, final int patch); static RobotVersion from(final String version); boolean isEqualTo(final RobotVersion otherVersion); boolean isNotEqualTo(final RobotVersion otherVersion); boolean isOlderThan(final RobotVersion otherVersion); boolean isOlderThanOrEqualTo(final RobotVersion otherVersion); boolean isNewerThan(final RobotVersion otherVersion); boolean isNewerOrEqualTo(final RobotVersion otherVersion); boolean isDeprecated(); @Override int compareTo(final RobotVersion otherVersion); @Override boolean equals(final Object obj); @Override int hashCode(); String asString(); @Override String toString(); static final RobotVersion UNKNOWN; }
@Test public void isNotEqualToTest() { assertThat(RobotVersion.from("1.2").isNotEqualTo(RobotVersion.from("1.2"))).isFalse(); assertThat(RobotVersion.from("1.2.3").isNotEqualTo(RobotVersion.from("1.2.3"))).isFalse(); assertThat(RobotVersion.from("1.2").isNotEqualTo(RobotVersion.from("1.2.3"))).isTrue(); assertThat(RobotVersion.from("1.2.3").isNotEqualTo(RobotVersion.from("1.2"))).isTrue(); }