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

package com.azure.resourcemanager.mariadb.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.mariadb.fluent.models.RecommendedActionSessionsOperationStatusInner;
import java.time.OffsetDateTime;
import org.junit.jupiter.api.Assertions;

public final class RecommendedActionSessionsOperationStatusInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RecommendedActionSessionsOperationStatusInner model =
            BinaryData
                .fromString("{\"name\":\"sqfsubcgjbirxb\",\"startTime\":\"2021-08-16T05:09:52Z\",\"status\":\"rfbjf\"}")
                .toObject(RecommendedActionSessionsOperationStatusInner.class);
        Assertions.assertEquals("sqfsubcgjbirxb", model.name());
        Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T05:09:52Z"), model.startTime());
        Assertions.assertEquals("rfbjf", model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RecommendedActionSessionsOperationStatusInner model =
            new RecommendedActionSessionsOperationStatusInner()
                .withName("sqfsubcgjbirxb")
                .withStartTime(OffsetDateTime.parse("2021-08-16T05:09:52Z"))
                .withStatus("rfbjf");
        model = BinaryData.fromObject(model).toObject(RecommendedActionSessionsOperationStatusInner.class);
        Assertions.assertEquals("sqfsubcgjbirxb", model.name());
        Assertions.assertEquals(OffsetDateTime.parse("2021-08-16T05:09:52Z"), model.startTime());
        Assertions.assertEquals("rfbjf", model.status());
    }
}
