You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: roles_test.go
    path of file: ./repos/magistrala/pkg/clients
    
    the code of the file until where you have to start completion: // Copyright (c) Abstract Machines
// SPDX-License-Identifier: Apache-2.0

package clients_test

import (
	"testing"

	"github.com/absmach/magistrala/internal/apiutil"
	"github.com/absmach/magistrala/pkg/clients"
	"github.com/stretc
    
func TestRoleUnmarshalJSON(t *testing.T) {
	cases := []struct {
		desc     string
		expected clients.Role
		role     []byte
		err      error
	}{
		{
			desc:     "User",
			expected: clients.UserRole,
			role:     []byte(`"user"`),
			err:      nil,
		},
		{
			desc:     "Admin",
			expected: clients.AdminRole,
			role:     []byte(`"admin"`),
			err:      nil,
		},
		{
			desc:     "All",
			expected: clients.AllRole,
			role:     []byte(`"all"`),
			err:      nil,
		},
		{
			desc:     "Unknown",
			expected: clients.Role(0),
			role:     []byte(`"unknown"`),
			err:      apiutil.ErrInvalidRole,
		},
	}

	for _, tc := range cases {
		t.Run(tc.desc, func(t *testing.T) {
			var r clients.Role
			err := r.UnmarshalJSON(tc.role)
			assert.Equal(t, tc.err, err, "UnmarshalJSON() error = %v, expected %v", err, tc.err)
			assert.Equal(t, tc.expected, r, "UnmarshalJSON() = %v, expected %v", r, tc.expected)
		})
	}
}