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

package com.azure.resourcemanager.resourcehealth.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.resourcehealth.models.RecommendedAction;
import org.junit.jupiter.api.Assertions;

public final class RecommendedActionTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RecommendedAction model =
            BinaryData
                .fromString(
                    "{\"action\":\"ex\",\"actionUrl\":\"bhtqqrolfpfpsa\",\"_ActionUrl.Comment\":\"bquxigjy\",\"actionUrlText\":\"zjaoyfhrtxil\"}")
                .toObject(RecommendedAction.class);
        Assertions.assertEquals("ex", model.action());
        Assertions.assertEquals("bhtqqrolfpfpsa", model.actionUrl());
        Assertions.assertEquals("zjaoyfhrtxil", model.actionUrlText());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RecommendedAction model =
            new RecommendedAction().withAction("ex").withActionUrl("bhtqqrolfpfpsa").withActionUrlText("zjaoyfhrtxil");
        model = BinaryData.fromObject(model).toObject(RecommendedAction.class);
        Assertions.assertEquals("ex", model.action());
        Assertions.assertEquals("bhtqqrolfpfpsa", model.actionUrl());
        Assertions.assertEquals("zjaoyfhrtxil", model.actionUrlText());
    }
}
