func (e *User) isEqualUser(e1 *User) bool {
	return e1 != nil && e.Name == e1.Name &&
		e.Entity.isEqualProperties(e1.Entity) && e1.Entity.isEqualProperties(e.Entity)
}
Compare 2 entities including their name and properties
package entityManagement
import (
	"fmt"
	"reflect"
	"testing"
	defs "github.com/ibm-security-innovation/libsecurity-go/defs"
	logger "github.com/ibm-security-innovation/libsecurity-go/logger"
)
const (
	entityName = "test1"
)
func (e Entity) getEntityStrWithProperties() string {
	str := fmt.Sprintf("'%v'\n", e.Name)
	for propertyName := range e.EntityProperties {
		data, _ := e.getProperty(propertyName)
		str += fmt.Sprintf("\tProperty: %v, data: %v\n", propertyName, defs.Serializers[propertyName].PrintProperties(data))
	}
	return str
}
func (g Group) getGroupStrWithProperties() string {
	return g.Entity.getEntityStrWithProperties() + fmt.Sprintf("\tMembers: %v\n", g.Group)
}
func (e *Entity) isEqualProperties(e1 Entity) bool {
	for propertyName := range e.EntityProperties {
		_, exist := defs.PropertiesName[propertyName]
		if exist == false {
			fmt.Printf("Internal error: unknown property '%v' was in the entity properties %v", propertyName, e.EntityProperties)
			return false
		}
		data1, _ := e.getProperty(propertyName)
		data2, _ := e1.getProperty(propertyName)
		if data1 == nil || data2 == nil {
			return false
		}
		if defs.Serializers[propertyName].IsEqualProperties(data1, data2) == false {
			return false
		}
	}
	return true
}