The WordPress plugin Advanced Custom Fields PRO (ACF PRO) does not offer a way to install it via composer natively. This plugin uses a 'package' repository (user supplied) that downloads the correct version from the ACF site using the version number from that repository and a license key from the ENVIRONMENT or an .env file. With this plugin user no longer need to expose their license key in composer.json.
Inheritance: implements Composer\Plugin\PluginInterface, implements Composer\EventDispatcher\EventSubscriberInterface
 public function testOnlyAddKeyOnAcfUrl()
 {
     // Make key available in the ENVIRONMENT
     putenv(self::KEY_ENV_VARIABLE . '=KEY');
     // Mock an Event
     $event = $this->getMockBuilder('Composer\\Plugin\\PreFileDownloadEvent')->disableOriginalConstructor()->setMethods(['getProcessedUrl', 'getRemoteFilesystem', 'setRemoteFilesystem'])->getMock();
     $event->expects($this->once())->method('getProcessedUrl')->willReturn('another-url');
     $event->expects($this->never())->method('getRemoteFilesystem');
     $event->expects($this->never())->method('setRemoteFilesystem');
     // Call addKey
     $plugin = new Plugin();
     $plugin->addKey($event);
 }