add tests for app delegate