// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.resourcemanager.recoveryservicesbackup.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.recoveryservicesbackup.models.IdentityInfo;
import org.junit.jupiter.api.Assertions;

public final class IdentityInfoTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        IdentityInfo model =
            BinaryData
                .fromString("{\"isSystemAssignedIdentity\":false,\"managedIdentityResourceId\":\"lrmcaykg\"}")
                .toObject(IdentityInfo.class);
        Assertions.assertEquals(false, model.isSystemAssignedIdentity());
        Assertions.assertEquals("lrmcaykg", model.managedIdentityResourceId());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        IdentityInfo model =
            new IdentityInfo().withIsSystemAssignedIdentity(false).withManagedIdentityResourceId("lrmcaykg");
        model = BinaryData.fromObject(model).toObject(IdentityInfo.class);
        Assertions.assertEquals(false, model.isSystemAssignedIdentity());
        Assertions.assertEquals("lrmcaykg", model.managedIdentityResourceId());
    }
}
