+
+ /**
+ * Test the {@link TmfTraceUtils#registerEventAspect(ITmfEventAspect)} method
+ */
+ @Test
+ public void testAdditionalAspects() {
+ TmfTrace trace = fTrace;
+
+ assertNotNull(trace);
+
+ ITmfContext context = trace.seekEvent(0L);
+ ITmfEvent event = trace.getNext(context);
+ assertNotNull(event);
+
+ Object obj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, TestEventAspect.class, event);
+ assertNull(obj);
+
+ // Register the aspect
+ TmfTraceUtils.registerEventAspect(new TestEventAspect());
+ // See that the aspect is resolved now
+ obj = TmfTraceUtils.resolveEventAspectOfClassForEvent(trace, TestEventAspect.class, event);
+ assertNotNull(obj);
+ assertEquals(TestEventAspect.RESOLVED_VALUE, obj);
+ }