Tests for NEXT and LAST.