1 /*******************************************************************************
2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2019 Wipro Limited.
6 * ==============================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 *******************************************************************************/
22 package org.onap.dcaegen2.services.sonhms.child;
25 import java.util.ArrayList;
26 import java.util.HashMap;
29 import org.junit.Test;
30 import org.onap.dcaegen2.services.sonhms.model.CellPciPair;
33 public class TestDetection {
35 public void testDetection() {
37 CellPciPair cpPair = new CellPciPair();
38 cpPair.setCellId("32");
39 cpPair.setPhysicalCellId(26);
41 CellPciPair cpPair1 = new CellPciPair();
42 cpPair1.setCellId("25");
43 cpPair1.setPhysicalCellId(23);
45 CellPciPair cpPair2 = new CellPciPair();
46 cpPair2.setCellId("42");
47 cpPair2.setPhysicalCellId(26);
49 CellPciPair cpPair3 = new CellPciPair();
50 cpPair3.setCellId("56");
51 cpPair3.setPhysicalCellId(200);
53 CellPciPair cpPair4 = new CellPciPair();
54 cpPair4.setCellId("21");
55 cpPair4.setPhysicalCellId(5);
57 CellPciPair cpPair5 = new CellPciPair();
58 cpPair5.setCellId("24");
59 cpPair5.setPhysicalCellId(5);
61 CellPciPair cpPair6 = new CellPciPair();
62 cpPair6.setCellId("38");
63 cpPair6.setPhysicalCellId(126);
65 CellPciPair cpPair7 = new CellPciPair();
66 cpPair7.setCellId("67");
67 cpPair7.setPhysicalCellId(300);
69 CellPciPair cpPair8 = new CellPciPair();
70 cpPair8.setCellId("69");
71 cpPair8.setPhysicalCellId(129);
73 CellPciPair cpPair9 = new CellPciPair();
74 cpPair9.setCellId("78");
75 cpPair9.setPhysicalCellId(147);
77 ArrayList<CellPciPair> al = new ArrayList<CellPciPair>();
82 ArrayList<CellPciPair> al1 = new ArrayList<CellPciPair>();
87 ArrayList<CellPciPair> al2 = new ArrayList<CellPciPair>();
92 Map<CellPciPair, ArrayList<CellPciPair>> map = new HashMap<CellPciPair, ArrayList<CellPciPair>>();
95 map.put(cpPair1, al1);
96 map.put(cpPair2, al2);
97 map.put(cpPair3, new ArrayList<CellPciPair>());
98 map.put(cpPair4, new ArrayList<CellPciPair>());
99 map.put(cpPair5, new ArrayList<CellPciPair>());
100 map.put(cpPair6, new ArrayList<CellPciPair>());
101 map.put(cpPair7, new ArrayList<CellPciPair>());
102 map.put(cpPair8, new ArrayList<CellPciPair>());
103 map.put(cpPair9, new ArrayList<CellPciPair>());
104 Graph cluster = new Graph();
106 cluster.setCellPciNeighbourMap(map);
108 System.out.println("mapsssssss" + cluster.getCellPciNeighbourMap());
109 Detection detect = new Detection();
110 detect.detectCollisionConfusion(cluster);
111 System.out.println("result" + detect.detectCollisionConfusion(cluster));