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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreSettings;
import com.azure.resourcemanager.dataprotection.models.CrossSubscriptionRestoreState;
import org.junit.jupiter.api.Assertions;

public final class CrossSubscriptionRestoreSettingsTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        CrossSubscriptionRestoreSettings model =
            BinaryData.fromString("{\"state\":\"Disabled\"}").toObject(CrossSubscriptionRestoreSettings.class);
        Assertions.assertEquals(CrossSubscriptionRestoreState.DISABLED, model.state());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        CrossSubscriptionRestoreSettings model =
            new CrossSubscriptionRestoreSettings().withState(CrossSubscriptionRestoreState.DISABLED);
        model = BinaryData.fromObject(model).toObject(CrossSubscriptionRestoreSettings.class);
        Assertions.assertEquals(CrossSubscriptionRestoreState.DISABLED, model.state());
    }
}
