-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
5.3.0.CR1
-
None
AbstractRuleBase.getTypeDeclaration(Class clazz) cannot determine what type is being mocked, so attempting to mock an event causes the system to fall back to the object being a simple fact. Have test classes to attach to issue: explanation of what I'm seeing:
testMockObjectAsEvent: may not be the same issue, but the system cannot identify the correct extractor for the event timestamp, and attempts to get a Long value from a method that returns a Date. In this case, it's at least identified as an event.
testMockObjectAsEventTwoLevels: mock is of an interface that extends a declared event; in this case the mock is never identified as an event, but still follows the path into the rule's window function, resulting in an attempt to cast the mock's DefaultFactHandle to an EventFactHandle.