// 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.fluent.models.OperationStatusInner;
import org.junit.jupiter.api.Assertions;

public final class OperationStatusInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        OperationStatusInner model =
            BinaryData
                .fromString(
                    "{\"id\":\"a\",\"name\":\"th\",\"startTime\":\"hab\",\"endTime\":\"pikxwczbyscnpqxu\",\"status\":\"vyq\"}")
                .toObject(OperationStatusInner.class);
        Assertions.assertEquals("a", model.id());
        Assertions.assertEquals("th", model.name());
        Assertions.assertEquals("hab", model.startTime());
        Assertions.assertEquals("pikxwczbyscnpqxu", model.endTime());
        Assertions.assertEquals("vyq", model.status());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        OperationStatusInner model =
            new OperationStatusInner()
                .withId("a")
                .withName("th")
                .withStartTime("hab")
                .withEndTime("pikxwczbyscnpqxu")
                .withStatus("vyq");
        model = BinaryData.fromObject(model).toObject(OperationStatusInner.class);
        Assertions.assertEquals("a", model.id());
        Assertions.assertEquals("th", model.name());
        Assertions.assertEquals("hab", model.startTime());
        Assertions.assertEquals("pikxwczbyscnpqxu", model.endTime());
        Assertions.assertEquals("vyq", model.status());
    }
}
