Tests used heavily mocked version of the apt_key code, which meant that it didn't properly test real life scenario.
Pretty straightforward. Give it a URL with an exported GPG key for signing an Apt repository. It downloads it and will install it using apt-key. It's even smart enough to tell if it's already there (i.e. actually tells you if it changed or not).