// compute a hash of a policy rule so we can sort in a deterministic order func hashOf(p rbacv1.PolicyRule) string { … } type byHash … func (b byHash) Len() int { … } func (b byHash) Less(i, j int) bool { … } func (b byHash) Swap(i, j int) { … } func TestDefaultRuleResolver(t *testing.T) { … } func TestAppliesTo(t *testing.T) { … }