the junit does not call objects during testing

Here’s how to fix this, change the implemenation of equals to this:

  @Override public boolean equals(Object obj) {
    if (EntityStringProperty.class.isAssignableFrom(obj.getClass())) {
      EntityStringProperty property = (EntityStringProperty) obj;
      if (getStringValue().equals(property.getStringValue()) && getValueType().isAssignableFrom(
          property.getValueType())) {
        return true;
      }
    }
    return false;
  }

Notice the change,

getValueType().isAssignableFrom(property.getValueType())

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top