Add testcase
Fix bug with EventPeriod