Add security_manager_prepare_app() tests