StringBaseType extends BaseType { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof StringBaseType)) { return false; } if (!super.equals(other)) { return false; } StringBaseType that = (StringBaseType) other; return Objects.equals(minLength, that.getMinLength()) && Objects.equals(maxLength, that.getMaxLength()); } StringBaseType();  StringBaseType(Value enums);  StringBaseType(Long minLength, Long maxLength); Long getMinLength(); Long getMaxLength(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new StringBaseType(), new StringBaseType(null, null)) .addEqualityGroup( new StringBaseType(Atom.string("123")), new StringBaseType(Atom.string("123")) ) .addEqualityGroup(new StringBaseType(24L, null), new StringBaseType(24L, null)) .addEqualityGroup(new StringBaseType(null, 42L), new StringBaseType(null, 42L)) .testEquals(); }