Add unit test for #2167

4 jobs for fix-oauth2-handler-2167 in 17 minutes and 58 seconds (queued for 10 seconds)