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

package com.azure.resourcemanager.security.generated;

import com.azure.core.util.BinaryData;
import com.azure.resourcemanager.security.fluent.models.RuleResultsInner;
import com.azure.resourcemanager.security.fluent.models.RulesResultsInner;
import com.azure.resourcemanager.security.models.RuleResultsProperties;
import java.util.Arrays;

public final class RulesResultsInnerTests {
    @org.junit.jupiter.api.Test
    public void testDeserialize() throws Exception {
        RulesResultsInner model =
            BinaryData
                .fromString(
                    "{\"value\":[{\"properties\":{\"results\":[]},\"id\":\"clcdigptajbrzmq\",\"name\":\"ucycijo\",\"type\":\"lxiutgjcyzyzjdnr\"},{\"properties\":{\"results\":[]},\"id\":\"txjeaoqaqbzgy\",\"name\":\"fwwvuatbwbqam\",\"type\":\"e\"},{\"properties\":{\"results\":[]},\"id\":\"yslpkcvmw\",\"name\":\"auxxepmyw\",\"type\":\"ormcqmic\"}]}")
                .toObject(RulesResultsInner.class);
    }

    @org.junit.jupiter.api.Test
    public void testSerialize() throws Exception {
        RulesResultsInner model =
            new RulesResultsInner()
                .withValue(
                    Arrays
                        .asList(
                            new RuleResultsInner()
                                .withProperties(new RuleResultsProperties().withResults(Arrays.asList())),
                            new RuleResultsInner()
                                .withProperties(new RuleResultsProperties().withResults(Arrays.asList())),
                            new RuleResultsInner()
                                .withProperties(new RuleResultsProperties().withResults(Arrays.asList()))));
        model = BinaryData.fromObject(model).toObject(RulesResultsInner.class);
    }
}
