Fix getting application ID; add a smoke test