How to write a test class for "ConnectedAppPluginExample", mentioned by salesforce, here -> https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Auth_ConnectedAppPlugin.htm#apex_class_Auth_ConnectedAppPlugin
Here is the background: For the OAuth2.0 flow, we register/configure our app in the connected-app of salesforce and get the consumer_key and comsumer_secret and configure these key and secret and make a request to Salesforce to get the authorization code(after user authentication) and with that authorization code, we make one more request to get the access token. If we want to add id_token along with access token (ID token is a signed data structure that contains authenticated user attributes, encoded as a JSON Web Token (JWT)) we need to configure connected-app in Salesforce as below,
ID Token will have 3 things, 1.The algorithm used 2.Payload 3.Signature
If we have to customize the custom attributes of the Payload, then salesforce says we need to implement a plugin and point it in the "Custom ConnectedApp Handler" section as shown in the pic above and the document is in the link.
But the documents don't say anything about writing a test case for this plugin or how to, because the execution of this plug-in is through a OAuth flow.
So, My question is "How to write a test class for this plug-in".