A teenager allegedly boarded a Jetstar plane armed with a long-arm firearm and ammunition, a court has heard.