// 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.UnlockDeleteRequest;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class UnlockDeleteRequestTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        UnlockDeleteRequest model =
            BinaryData
                .fromString(
                    "{\"resourceGuardOperationRequests\":[\"bycnunvjsrtkf\",\"wnopqgikyzirtx\",\"yuxzejntpsewgi\"],\"resourceToBeDeleted\":\"l\"}")
                .toObject(UnlockDeleteRequest.class);
        Assertions.assertEquals("bycnunvjsrtkf", model.resourceGuardOperationRequests().get(0));
        Assertions.assertEquals("l", model.resourceToBeDeleted());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        UnlockDeleteRequest model =
            new UnlockDeleteRequest()
                .withResourceGuardOperationRequests(Arrays.asList("bycnunvjsrtkf", "wnopqgikyzirtx", "yuxzejntpsewgi"))
                .withResourceToBeDeleted("l");
        model = BinaryData.fromObject(model).toObject(UnlockDeleteRequest.class);
        Assertions.assertEquals("bycnunvjsrtkf", model.resourceGuardOperationRequests().get(0));
        Assertions.assertEquals("l", model.resourceToBeDeleted());
    }
}
