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

package com.azure.resourcemanager.dataprotection.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.dataprotection.models.BackupSchedule;
import java.util.Arrays;
import org.junit.jupiter.api.Assertions;

public final class BackupScheduleTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        BackupSchedule model =
            BinaryData
                .fromString(
                    "{\"repeatingTimeIntervals\":[\"hjjklff\",\"mouwqlgzrfzeey\",\"bizikayuhq\",\"bjbsybb\"],\"timeZone\":\"r\"}")
                .toObject(BackupSchedule.class);
        Assertions.assertEquals("hjjklff", model.repeatingTimeIntervals().get(0));
        Assertions.assertEquals("r", model.timeZone());
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        BackupSchedule model =
            new BackupSchedule()
                .withRepeatingTimeIntervals(Arrays.asList("hjjklff", "mouwqlgzrfzeey", "bizikayuhq", "bjbsybb"))
                .withTimeZone("r");
        model = BinaryData.fromObject(model).toObject(BackupSchedule.class);
        Assertions.assertEquals("hjjklff", model.repeatingTimeIntervals().get(0));
        Assertions.assertEquals("r", model.timeZone());
    }
}
