Add unit tests for FlushLock & FormSubmitted