func EnsureTypeEquality(t *testing.T, actual interface{}, expected interface{}) {
	if !TypesAreEqual(actual, expected) {
		t.Errorf("Types are not equal. Expected '%s', received '%s", reflect.TypeOf(actual).String(), reflect.TypeOf(expected).String())
	}
}
EnsureTypeEquality uses the test object and fails the test if the types are not equal
package testutil
import (
	"reflect"
	"testing"
)
func TypesAreEqual(a interface{}, b interface{}) bool {
	return reflect.TypeOf(a) == reflect.TypeOf(b)
}