fix and improve unit tests when setting endMaximumTimestamp