Version change for security fix
[dcaegen2/services/son-handler.git] / src / test / java / com / wipro / www / sonhms / child / TestDetection.java
1 /*******************************************************************************
2  * ============LICENSE_START=======================================================
3  * pcims
4  *  ================================================================================
5  *  Copyright (C) 2018 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
10  *
11  *        http://www.apache.org/licenses/LICENSE-2.0
12  *
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=========================================================
19  ******************************************************************************/
20
21 package com.wipro.www.sonhms.child;
22
23
24 import com.wipro.www.sonhms.child.Detection;
25 import com.wipro.www.sonhms.child.Graph;
26 import com.wipro.www.sonhms.model.CellPciPair;
27
28 import java.util.ArrayList;
29 import java.util.HashMap;
30 import java.util.Map;
31
32 import org.junit.Test;
33
34
35 public class TestDetection {
36     @Test
37     public void testDetection() {
38
39         CellPciPair cpPair = new CellPciPair();
40         cpPair.setCellId("32");
41         cpPair.setPhysicalCellId(26);
42
43         CellPciPair cpPair1 = new CellPciPair();
44         cpPair1.setCellId("25");
45         cpPair1.setPhysicalCellId(23);
46
47         CellPciPair cpPair2 = new CellPciPair();
48         cpPair2.setCellId("42");
49         cpPair2.setPhysicalCellId(26);
50
51         CellPciPair cpPair3 = new CellPciPair();
52         cpPair3.setCellId("56");
53         cpPair3.setPhysicalCellId(200);
54
55         CellPciPair cpPair4 = new CellPciPair();
56         cpPair4.setCellId("21");
57         cpPair4.setPhysicalCellId(5);
58
59         CellPciPair cpPair5 = new CellPciPair();
60         cpPair5.setCellId("24");
61         cpPair5.setPhysicalCellId(5);
62
63         CellPciPair cpPair6 = new CellPciPair();
64         cpPair6.setCellId("38");
65         cpPair6.setPhysicalCellId(126);
66
67         CellPciPair cpPair7 = new CellPciPair();
68         cpPair7.setCellId("67");
69         cpPair7.setPhysicalCellId(300);
70
71         CellPciPair cpPair8 = new CellPciPair();
72         cpPair8.setCellId("69");
73         cpPair8.setPhysicalCellId(129);
74
75         CellPciPair cpPair9 = new CellPciPair();
76         cpPair9.setCellId("78");
77         cpPair9.setPhysicalCellId(147);
78
79         ArrayList<CellPciPair> al = new ArrayList<CellPciPair>();
80         al.add(cpPair1);
81         al.add(cpPair2);
82         al.add(cpPair3);
83
84         ArrayList<CellPciPair> al1 = new ArrayList<CellPciPair>();
85         al1.add(cpPair4);
86         al1.add(cpPair5);
87         al1.add(cpPair6);
88
89         ArrayList<CellPciPair> al2 = new ArrayList<CellPciPair>();
90         al2.add(cpPair7);
91         al2.add(cpPair8);
92         al2.add(cpPair9);
93
94         Map<CellPciPair, ArrayList<CellPciPair>> map = new HashMap<CellPciPair, ArrayList<CellPciPair>>();
95
96         map.put(cpPair, al);
97         map.put(cpPair1, al1);
98         map.put(cpPair2, al2);
99         map.put(cpPair3, new ArrayList<CellPciPair>());
100         map.put(cpPair4, new ArrayList<CellPciPair>());
101         map.put(cpPair5, new ArrayList<CellPciPair>());
102         map.put(cpPair6, new ArrayList<CellPciPair>());
103         map.put(cpPair7, new ArrayList<CellPciPair>());
104         map.put(cpPair8, new ArrayList<CellPciPair>());
105         map.put(cpPair9, new ArrayList<CellPciPair>());
106         Graph cluster = new Graph();
107
108         cluster.setCellPciNeighbourMap(map);
109
110         System.out.println("mapsssssss" + cluster.getCellPciNeighbourMap());
111         Detection detect = new Detection();
112         detect.detectCollisionConfusion(cluster);
113         System.out.println("result" + detect.detectCollisionConfusion(cluster));
114
115     }
116
117 }