Adding some unit tests for UserActivityOverPeriod plus fixing some issues found whilst writing them!