2 * ============LICENSE_START=======================================================
\r
3 * Copyright (C) 2025 OpenInfra Foundation Europe. All rights reserved.
\r
4 * ================================================================================
\r
5 * Licensed under the Apache License, Version 2.0 (the "License");
\r
6 * you may not use this file except in compliance with the License.
\r
7 * You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
17 * SPDX-License-Identifier: Apache-2.0
\r
18 * ============LICENSE_END=========================================================
\r
21 package org.onap.policy.clamp.models.acm.concepts;
\r
23 import static org.junit.jupiter.api.Assertions.assertEquals;
\r
25 import java.util.HashMap;
\r
26 import java.util.LinkedHashMap;
\r
27 import java.util.Map;
\r
28 import java.util.UUID;
\r
29 import java.util.function.UnaryOperator;
\r
30 import org.junit.jupiter.api.Test;
\r
31 import org.onap.policy.models.base.PfUtils;
\r
33 class AutomationCompositionRollbackTest {
\r
35 void testAutomationCompositionRollback() {
\r
36 var acr0 = new AutomationCompositionRollback();
\r
37 acr0.setInstanceId(UUID.randomUUID());
\r
38 acr0.setCompositionId(UUID.randomUUID());
\r
39 Map<String, Object> map = new LinkedHashMap<>();
\r
40 map.put("test", "test");
\r
41 acr0.setElements(PfUtils.mapMap(map, UnaryOperator.identity()));
\r
43 var acr1 = new AutomationCompositionRollback(acr0);
\r
44 assertEquals(acr0, acr1);
\r