Add auto test for delay and endDelay