1 /*******************************************************************************
2 * Copyright (c) 2011 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Mathieu Denis <mathieu.denis@polymtl.ca> - Initial design and implementation
11 * Bernd Hufmann - Fixed warnings
12 *******************************************************************************/
14 package org
.eclipse
.linuxtools
.tmf
.ui
.tests
.statistics
;
16 import java
.util
.Collection
;
17 import java
.util
.Iterator
;
18 import java
.util
.Vector
;
20 import junit
.framework
.TestCase
;
22 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEventField
;
23 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEvent
;
24 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEventField
;
25 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfEventType
;
26 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimestamp
;
27 import org
.eclipse
.linuxtools
.tmf
.core
.util
.TmfFixedArray
;
28 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.ITmfExtraEventInfo
;
29 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
.AbsTmfStatisticsTree
;
30 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
.Messages
;
31 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
.TmfBaseStatisticsTree
;
32 import org
.eclipse
.linuxtools
.tmf
.ui
.viewers
.statistics
.model
.TmfStatisticsTreeNode
;
35 * TmfStatisticsTreeNode Test Cases.
37 @SuppressWarnings("nls")
38 public class TmfStatisticsTreeNodeTest
extends TestCase
{
40 // ------------------------------------------------------------------------
42 // ------------------------------------------------------------------------
43 private String fTestName
= null;
46 private final String fContext
= "UnitTest";
47 private final String fTypeId1
= "Some type1";
48 private final String fTypeId2
= "Some type2";
50 private final String fLabel0
= "label1";
51 private final String fLabel1
= "label2";
52 private final String fLabel2
= "label3";
53 private final String
[] fLabels
= new String
[] { fLabel0
, fLabel1
, fLabel2
};
55 private final TmfTimestamp fTimestamp1
= new TmfTimestamp(12345, (byte) 2, 5);
56 private final TmfTimestamp fTimestamp2
= new TmfTimestamp(12350, (byte) 2, 5);
57 private final TmfTimestamp fTimestamp3
= new TmfTimestamp(12355, (byte) 2, 5);
59 private final String fSource
= "Source";
61 private final TmfEventType fType1
= new TmfEventType(fContext
, fTypeId1
, TmfEventField
.makeRoot(fLabels
));
62 private final TmfEventType fType2
= new TmfEventType(fContext
, fTypeId2
, TmfEventField
.makeRoot(fLabels
));
64 private final String fReference
= "Some reference";
66 private final TmfEvent fEvent1
;
67 private final TmfEvent fEvent2
;
68 private final TmfEvent fEvent3
;
70 private final TmfEventField fContent1
;
71 private final TmfEventField fContent2
;
72 private final TmfEventField fContent3
;
74 private final TmfBaseStatisticsTree fStatsData
;
76 private final ITmfExtraEventInfo fExtraInfo
;
78 // ------------------------------------------------------------------------
80 // ------------------------------------------------------------------------
86 public TmfStatisticsTreeNodeTest(final String name
) {
91 fContent1
= new TmfEventField(ITmfEventField
.ROOT_FIELD_ID
, "Some content");
92 fEvent1
= new TmfEvent(null, fTimestamp1
, fSource
, fType1
, fContent1
, fReference
);
94 fContent2
= new TmfEventField(ITmfEventField
.ROOT_FIELD_ID
, "Some other content");
95 fEvent2
= new TmfEvent(null, fTimestamp2
, fSource
, fType1
, fContent2
, fReference
);
97 fContent3
= new TmfEventField(ITmfEventField
.ROOT_FIELD_ID
, "Some other different content");
98 fEvent3
= new TmfEvent(null, fTimestamp3
, fSource
, fType2
, fContent3
, fReference
);
100 fStatsData
= new TmfBaseStatisticsTree();
101 fExtraInfo
= new ITmfExtraEventInfo() {
103 public String
getTraceName() {
107 fStatsData
.registerEvent(fEvent1
, fExtraInfo
);
108 fStatsData
.registerEvent(fEvent1
, fExtraInfo
, 2);
109 fStatsData
.registerEvent(fEvent2
, fExtraInfo
);
110 fStatsData
.registerEvent(fEvent2
, fExtraInfo
, 3);
111 fStatsData
.registerEvent(fEvent3
, fExtraInfo
);
112 fStatsData
.registerEvent(fEvent3
, fExtraInfo
, 4);
114 // Registers some events in time range
115 fStatsData
.registerEventInTimeRange(fEvent1
, fExtraInfo
);
116 fStatsData
.registerEventInTimeRange(fEvent1
, fExtraInfo
, 3);
117 fStatsData
.registerEventInTimeRange(fEvent2
, fExtraInfo
);
118 fStatsData
.registerEventInTimeRange(fEvent2
, fExtraInfo
, 4);
119 fStatsData
.registerEventInTimeRange(fEvent3
, fExtraInfo
);
120 fStatsData
.registerEventInTimeRange(fEvent3
, fExtraInfo
, 5);
123 // ------------------------------------------------------------------------
125 // ------------------------------------------------------------------------
128 * Test checking for child.
130 public void testContainsChild() {
131 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
132 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
133 // Creates a category from the key already created
134 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
136 assertTrue("containsChild", rootNode
.containsChild(fTestName
));
137 assertFalse("containsChild", rootNode
.containsChild(catNode
.getKey()));
138 assertFalse("containsChild", rootNode
.containsChild(null));
140 assertTrue("containsChild", traceNode
.containsChild(catNode
.getKey()));
141 assertFalse("containsChild", traceNode
.containsChild(fType1
.getName()));
142 assertFalse("containsChild", traceNode
.containsChild(null));
144 assertTrue("containsChild", catNode
.containsChild(fType1
.getName()));
145 assertTrue("containsChild", catNode
.containsChild(fType2
.getName()));
146 assertFalse("containsChild", catNode
.containsChild(null));
149 // ------------------------------------------------------------------------
151 // ------------------------------------------------------------------------
154 * Test getting of children.
156 public void testGetChildren() {
157 // Getting children of the ROOT
158 Collection
<TmfStatisticsTreeNode
> childrenTreeNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
).getChildren();
159 assertEquals("getChildren", 1, childrenTreeNode
.size());
160 TmfStatisticsTreeNode treeNode
= childrenTreeNode
.iterator().next();
161 assertEquals("getChildren", fTestName
, treeNode
.getKey());
163 // Getting children of the trace
164 childrenTreeNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
)).getChildren();
165 assertEquals("getChildren", 1, childrenTreeNode
.size());
166 treeNode
= childrenTreeNode
.iterator().next();
167 assertEquals("getChildren", Messages
.TmfStatisticsData_EventTypes
, treeNode
.getKey());
169 Vector
<String
> keyExpected
= new Vector
<String
>();
170 keyExpected
.add(fType1
.getName());
171 keyExpected
.add(fType2
.getName());
172 // Getting children of a category
173 childrenTreeNode
= treeNode
.getChildren();
174 assertEquals("getChildren", 2, childrenTreeNode
.size());
176 Iterator
<TmfStatisticsTreeNode
> iterChild
= childrenTreeNode
.iterator();
177 TmfStatisticsTreeNode temp
;
178 while (iterChild
.hasNext()) {
179 temp
= iterChild
.next();
180 if (keyExpected
.contains(temp
.getKey())) {
181 keyExpected
.removeElement(temp
.getKey());
187 // Get children of a specific event type
188 childrenTreeNode
= fStatsData
.get(childrenTreeNode
.iterator().next().getPath()).getChildren();
189 assertEquals("getChildren", 0, childrenTreeNode
.size());
192 // ------------------------------------------------------------------------
194 // ------------------------------------------------------------------------
197 * Test getting of all children.
199 public void testGetAllChildren() {
200 // Getting children of the ROOT
201 Collection
<TmfStatisticsTreeNode
> childrenTreeNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
).getAllChildren();
202 assertEquals("getChildren", 1, childrenTreeNode
.size());
203 TmfStatisticsTreeNode treeNode
= childrenTreeNode
.iterator().next();
204 assertEquals("getChildren", fTestName
, treeNode
.getKey());
206 // Getting children of the trace
207 childrenTreeNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
)).getAllChildren();
208 assertEquals("getChildren", 1, childrenTreeNode
.size());
209 treeNode
= childrenTreeNode
.iterator().next();
210 assertEquals("getChildren", Messages
.TmfStatisticsData_EventTypes
, treeNode
.getKey());
212 Vector
<String
> keyExpected
= new Vector
<String
>();
213 keyExpected
.add(fType1
.getName());
214 keyExpected
.add(fType2
.getName());
216 * It should return the eventType even though the number of events
219 fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName())).reset();
220 // Getting children of a category
221 childrenTreeNode
= treeNode
.getAllChildren();
222 assertEquals("getChildren", 2, childrenTreeNode
.size());
224 Iterator
<TmfStatisticsTreeNode
> iterChild
= childrenTreeNode
.iterator();
225 TmfStatisticsTreeNode temp
;
226 while (iterChild
.hasNext()) {
227 temp
= iterChild
.next();
228 if (keyExpected
.contains(temp
.getKey())) {
229 keyExpected
.removeElement(temp
.getKey());
235 // Get children of a specific event type
236 childrenTreeNode
= fStatsData
.get(childrenTreeNode
.iterator().next().getPath()).getAllChildren();
237 assertEquals("getChildren", 0, childrenTreeNode
.size());
240 // ------------------------------------------------------------------------
242 // ------------------------------------------------------------------------
245 * Test getting of number of children.
247 public void testGetNbChildren() {
248 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
249 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
250 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
251 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
253 assertEquals("getNbChildren", 1, rootNode
.getNbChildren());
254 assertEquals("getNbChildren", 1, traceNode
.getNbChildren());
255 assertEquals("getNbChildren", 2, catNode
.getNbChildren());
256 assertEquals("getNbChildren", 0, elementNode
.getNbChildren());
259 // ------------------------------------------------------------------------
261 // ------------------------------------------------------------------------
264 * Test checking for children.
266 public void testHasChildren() {
267 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
268 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
269 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
270 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
272 assertTrue("hasChildren", rootNode
.hasChildren());
273 assertTrue("hasChildren", traceNode
.hasChildren());
274 assertTrue("hasChildren", catNode
.hasChildren());
275 assertFalse("hasChildren", elementNode
.hasChildren());
278 // ------------------------------------------------------------------------
280 // ------------------------------------------------------------------------
283 * Test getting of parent.
285 public void testGetParent() {
286 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
287 TmfStatisticsTreeNode parentNode
= rootNode
.getParent();
288 assertNull("getParent", parentNode
);
290 TmfStatisticsTreeNode newTraceNode
= new TmfStatisticsTreeNode(new TmfFixedArray
<String
>("newly created trace node"), fStatsData
);
291 parentNode
= newTraceNode
.getParent();
292 assertNotNull("getParent", parentNode
);
293 assertEquals("getParent", 0, parentNode
.getKey().compareTo(fStatsData
.get(AbsTmfStatisticsTree
.ROOT
).getKey().toString()));
295 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
296 parentNode
= traceNode
.getParent();
297 assertNotNull("getParent", parentNode
);
298 assertEquals("getParent", 0, parentNode
.getPath().toString().compareTo(AbsTmfStatisticsTree
.ROOT
.toString()));
300 TmfStatisticsTreeNode newNode
= new TmfStatisticsTreeNode(new TmfFixedArray
<String
>("TreeNode", Messages
.TmfStatisticsData_EventTypes
, "TreeNode that should not exist"), fStatsData
);
301 parentNode
= newNode
.getParent();
302 assertNull("getParent", parentNode
);
304 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
305 parentNode
= elementNode
.getParent();
306 assertNull("getParent", parentNode
);
308 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
309 parentNode
= catNode
.getParent();
310 assertNotNull("getParent", parentNode
);
311 assertEquals("getParent", 0, parentNode
.getPath().toString().compareTo(fStatsData
.get(new TmfFixedArray
<String
>(fTestName
)).getPath().toString()));
313 parentNode
= elementNode
.getParent();
314 assertNotNull("getParent", parentNode
);
315 assertTrue("getParent", parentNode
.getPath().equals(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
)));
318 // ------------------------------------------------------------------------
320 // ------------------------------------------------------------------------
323 * Test getting of key.
325 public void testGetKey() {
326 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
327 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
328 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
329 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
331 assertEquals("getKey", 0, rootNode
.getKey().compareTo(AbsTmfStatisticsTree
.ROOT
.get(0)));
332 assertEquals("getKey", 0, traceNode
.getKey().compareTo(fTestName
));
333 assertEquals("getKey", 0, catNode
.getKey().compareTo(Messages
.TmfStatisticsData_EventTypes
));
334 assertEquals("getKey", 0, elementNode
.getKey().compareTo(fType1
.getName()));
337 // ------------------------------------------------------------------------
339 // ------------------------------------------------------------------------
342 * Test getting of path to node.
344 public void testGetPath() {
345 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
346 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
347 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
348 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
350 assertTrue("getPath", rootNode
.getPath().equals(AbsTmfStatisticsTree
.ROOT
));
351 assertTrue("getPath", traceNode
.getPath().equals(new TmfFixedArray
<String
>(fTestName
)));
352 assertTrue("getPath", catNode
.getPath().equals(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
)));
353 assertTrue("getPath", elementNode
.getPath().equals(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName())));
356 // ------------------------------------------------------------------------
358 // ------------------------------------------------------------------------
361 * Test getting statistic value.
363 public void testGetValue() {
364 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
365 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
366 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
367 TmfStatisticsTreeNode elementNode1
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
368 TmfStatisticsTreeNode elementNode3
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType2
.getName()));
370 assertEquals("getValue", 0, rootNode
.getValue().getTotal());
371 assertEquals("getValue", 12, traceNode
.getValue().getTotal());
372 assertEquals("getValue", 0, catNode
.getValue().getTotal());
373 assertEquals("getValue", 7, elementNode1
.getValue().getTotal());
374 assertEquals("getValue", 5, elementNode3
.getValue().getTotal());
376 assertEquals("getValue", 0, rootNode
.getValue().getPartial());
377 assertEquals("getValue", 15, traceNode
.getValue().getPartial());
378 assertEquals("getValue", 0, catNode
.getValue().getPartial());
379 assertEquals("getValue", 9, elementNode1
.getValue().getPartial());
380 assertEquals("getValue", 6, elementNode3
.getValue().getPartial());
383 // ------------------------------------------------------------------------
385 // ------------------------------------------------------------------------
388 * Test reset of tree.
390 public void testReset() {
391 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
392 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
393 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
394 TmfStatisticsTreeNode elementNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
397 assertEquals("reset", 0, elementNode
.getValue().getTotal());
398 assertEquals("reset", 0, elementNode
.getValue().getPartial());
401 assertEquals("reset", 0, catNode
.getValue().getTotal());
402 assertEquals("reset", 0, catNode
.getValue().getPartial());
403 assertEquals("reset", 0, catNode
.getNbChildren());
404 assertNull("reset", fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName())));
407 assertEquals("reset", 0, traceNode
.getValue().getTotal());
408 assertEquals("reset", 0, traceNode
.getValue().getPartial());
409 // A trace always have at least one child that is eventType
410 assertEquals("reset", 1, traceNode
.getNbChildren());
413 assertEquals("reset", 0, rootNode
.getValue().getTotal());
414 assertEquals("reset", 0, rootNode
.getValue().getPartial());
415 assertEquals("reset", 1, rootNode
.getNbChildren());
419 * Test reset global value of the node in the tree. It should only clear
420 * the global value without removing any node from the tree.
422 public void testResetGlobalValue() {
423 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
424 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
425 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
426 TmfStatisticsTreeNode eventTypeNode1
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
427 TmfStatisticsTreeNode eventTypeNode2
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType2
.getName()));
429 rootNode
.resetGlobalValue();
431 assertEquals(0, rootNode
.getValue().getTotal());
432 assertEquals(0, traceNode
.getValue().getTotal());
433 assertEquals(0, catNode
.getValue().getTotal());
434 assertEquals(0, eventTypeNode1
.getValue().getTotal());
435 assertEquals(0, eventTypeNode2
.getValue().getTotal());
437 // Checks the state of the statistics tree
438 Collection
<TmfStatisticsTreeNode
> rootChildren
= rootNode
.getAllChildren();
439 assertEquals(1, rootChildren
.size());
440 assertTrue(rootChildren
.contains(traceNode
));
442 Collection
<TmfStatisticsTreeNode
> traceChildren
= traceNode
.getAllChildren();
443 assertEquals(1, traceChildren
.size());
444 assertTrue(traceChildren
.contains(catNode
));
446 Collection
<TmfStatisticsTreeNode
> catChildren
= catNode
.getAllChildren();
447 assertEquals(2, catChildren
.size());
448 assertTrue(catChildren
.contains(eventTypeNode1
));
449 assertTrue(catChildren
.contains(eventTypeNode2
));
453 * Test reset time range value of the node in the tree. It should only clear
454 * the time range value without removing any node from the tree.
456 public void testResetTimeRangeValue() {
457 TmfStatisticsTreeNode rootNode
= fStatsData
.get(AbsTmfStatisticsTree
.ROOT
);
458 TmfStatisticsTreeNode traceNode
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
));
459 TmfStatisticsTreeNode catNode
= traceNode
.getChildren().iterator().next();
460 TmfStatisticsTreeNode eventTypeNode1
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType1
.getName()));
461 TmfStatisticsTreeNode eventTypeNode2
= fStatsData
.get(new TmfFixedArray
<String
>(fTestName
, Messages
.TmfStatisticsData_EventTypes
, fType2
.getName()));
463 rootNode
.resetTimeRangeValue();
465 assertEquals(0, rootNode
.getValue().getPartial());
466 assertEquals(0, traceNode
.getValue().getPartial());
467 assertEquals(0, catNode
.getValue().getPartial());
468 assertEquals(0, eventTypeNode1
.getValue().getPartial());
469 assertEquals(0, eventTypeNode2
.getValue().getPartial());
471 // Checks the state of the statistics tree
472 Collection
<TmfStatisticsTreeNode
> rootChildren
= rootNode
.getAllChildren();
473 assertEquals(1, rootChildren
.size());
474 assertTrue(rootChildren
.contains(traceNode
));
476 Collection
<TmfStatisticsTreeNode
> traceChildren
= traceNode
.getAllChildren();
477 assertEquals(1, traceChildren
.size());
478 assertTrue(traceChildren
.contains(catNode
));
480 Collection
<TmfStatisticsTreeNode
> catChildren
= catNode
.getAllChildren();
481 assertEquals(2, catChildren
.size());
482 assertTrue(catChildren
.contains(eventTypeNode1
));
483 assertTrue(catChildren
.contains(eventTypeNode2
));