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

package com.azure.resourcemanager.mobilenetwork.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mobilenetwork.models.DesiredInstallationState;
import com.azure.resourcemanager.mobilenetwork.models.Installation;
import org.junit.jupiter.api.Assertions;

public final class InstallationTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Installation model =
            BinaryData
                .fromString(
                    "{\"desiredState\":\"Uninstalled\",\"state\":\"Failed\",\"reinstallRequired\":\"Required\",\"reasons\":[\"NoSlices\",\"NoAttachedDataNetworks\"],\"operation\":{\"id\":\"dwzbaiue\"}}")
                .toObject(Installation.class);
        Assertions.assertEquals(DesiredInstallationState.UNINSTALLED, model.desiredState());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Installation model = new Installation().withDesiredState(DesiredInstallationState.UNINSTALLED);
        model = BinaryData.fromObject(model).toObject(Installation.class);
        Assertions.assertEquals(DesiredInstallationState.UNINSTALLED, model.desiredState());
    }
}
