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

package com.azure.resourcemanager.batch.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.batch.models.ComputeNodeFillType;
import com.azure.resourcemanager.batch.models.TaskSchedulingPolicy;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public final class TaskSchedulingPolicyTests {
    @Test
    public void testDeserialize() {
        TaskSchedulingPolicy model =
            BinaryData.fromString("{\"nodeFillType\":\"Spread\"}").toObject(TaskSchedulingPolicy.class);
        Assertions.assertEquals(ComputeNodeFillType.SPREAD, model.nodeFillType());
    }

    @Test
    public void testSerialize() {
        TaskSchedulingPolicy model = new TaskSchedulingPolicy().withNodeFillType(ComputeNodeFillType.SPREAD);
        model = BinaryData.fromObject(model).toObject(TaskSchedulingPolicy.class);
        Assertions.assertEquals(ComputeNodeFillType.SPREAD, model.nodeFillType());
    }
}
