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

package com.azure.resourcemanager.redisenterprise.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.redisenterprise.models.LinkedDatabase;
import org.junit.jupiter.api.Assertions;

public final class LinkedDatabaseTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        LinkedDatabase model =
            BinaryData.fromString("{\"id\":\"mohctb\",\"state\":\"Unlinking\"}").toObject(LinkedDatabase.class);
        Assertions.assertEquals("mohctb", model.id());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        LinkedDatabase model = new LinkedDatabase().withId("mohctb");
        model = BinaryData.fromObject(model).toObject(LinkedDatabase.class);
        Assertions.assertEquals("mohctb", model.id());
    }
}
