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

package com.azure.resourcemanager.storageimportexport.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.storageimportexport.models.Export;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class ExportTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        Export model =
            BinaryData
                .fromString(
                    "{\"blobList\":{\"blobPath\":[\"byxqabn\"],\"blobPathPrefix\":[\"pcyshu\"]},\"blobListBlobPath\":\"afbljjgpbtoqcjmk\"}")
                .toObject(Export.class);
        Assertions.assertEquals("afbljjgpbtoqcjmk", model.blobListBlobPath());
        Assertions.assertEquals("byxqabn", model.blobPath().get(0));
        Assertions.assertEquals("pcyshu", model.blobPathPrefix().get(0));
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        Export model =
            new Export()
                .withBlobListBlobPath("afbljjgpbtoqcjmk")
                .withBlobPath(Arrays.asList("byxqabn"))
                .withBlobPathPrefix(Arrays.asList("pcyshu"));
        model = BinaryData.fromObject(model).toObject(Export.class);
        Assertions.assertEquals("afbljjgpbtoqcjmk", model.blobListBlobPath());
        Assertions.assertEquals("byxqabn", model.blobPath().get(0));
        Assertions.assertEquals("pcyshu", model.blobPathPrefix().get(0));
    }
}
