AuthUtils { static boolean isAuthorizationCodePresent(@NonNull Uri uri) { return !TextUtils.isEmpty(uri.getQueryParameter(KEY_AUTHENTICATION_CODE)); }  static boolean isRedirectUriRegistered(@NonNull Activity activity, @NonNull Uri uri); @NonNull static String scopeCollectionToString(@NonNull Collection<Scope> scopes); static String customScopeCollectionToString(@NonNull Collection<String> scopes); static String mergeScopeStrings(String... scopes);  }
@Test public void isAuthorizationCodePresent_whenPresent_shouldReturnTrue() { String redirectUrl = "http: assertTrue(AuthUtils.isAuthorizationCodePresent(Uri.parse(redirectUrl))); }
@Test public void isAuthorizationCodePresent_whenEmpty_shouldReturnFalse() { assertFalse(AuthUtils.isAuthorizationCodePresent(Uri.parse("http: }
@Test public void isAuthorizationCodePresent_whenMissing_shouldReturnFalse() { assertFalse(AuthUtils.isAuthorizationCodePresent(Uri.parse("http: }