Tests for encodeTimestamps.