@@ -286,6 +286,7 @@ public void confirmSignUp() throws AuthException {
286286 * @throws AuthException test fails if this gets thrown since method should succeed
287287 */
288288 @ Test
289+ @ SuppressWarnings ("unchecked" ) // Casts final parameter to Callback to differentiate methods
289290 public void resendSignUpCode () throws AuthException {
290291 SignUpResult amcResult = new SignUpResult (
291292 false ,
@@ -301,11 +302,11 @@ public void resendSignUpCode() throws AuthException {
301302 Callback <SignUpResult > callback = invocation .getArgument (1 );
302303 callback .onResult (amcResult );
303304 return null ;
304- }).when (mobileClient ).resendSignUp (any (), any ());
305+ }).when (mobileClient ).resendSignUp (any (), ( Callback < SignUpResult >) any ());
305306
306307 AuthSignUpResult result = synchronousAuth .resendSignUpCode (USERNAME );
307308 validateSignUpResult (result , AuthSignUpStep .CONFIRM_SIGN_UP_STEP );
308- verify (mobileClient ).resendSignUp (eq (USERNAME ), any ());
309+ verify (mobileClient ).resendSignUp (eq (USERNAME ), ( Callback < SignUpResult >) any ());
309310 }
310311
311312 /**
@@ -315,6 +316,7 @@ public void resendSignUpCode() throws AuthException {
315316 * @throws AuthException test fails if this gets thrown since method should succeed
316317 */
317318 @ Test
319+ @ SuppressWarnings ("unchecked" ) // Casts final parameter to Callback to differentiate methods
318320 public void signIn () throws AuthException {
319321 SignInResult amcResult = new SignInResult (
320322 SignInState .SMS_MFA ,
@@ -336,7 +338,7 @@ public void signIn() throws AuthException {
336338 Callback <SignInResult > callback = invocation .getArgument (3 );
337339 callback .onResult (amcResult );
338340 return null ;
339- }).when (mobileClient ).signIn (any (), any (), any (), any ());
341+ }).when (mobileClient ).signIn (any (), any (), any (), ( Callback < SignInResult >) any ());
340342
341343 AuthSignInResult result = synchronousAuth .signIn (
342344 USERNAME ,
@@ -350,7 +352,7 @@ public void signIn() throws AuthException {
350352 AuthSignInStep .CONFIRM_SIGN_IN_WITH_SMS_MFA_CODE
351353 );
352354
353- verify (mobileClient ).signIn (eq (USERNAME ), eq (PASSWORD ), eq (METADATA ), any ());
355+ verify (mobileClient ).signIn (eq (USERNAME ), eq (PASSWORD ), eq (METADATA ), ( Callback < SignInResult >) any ());
354356 }
355357
356358 /**
@@ -359,6 +361,7 @@ public void signIn() throws AuthException {
359361 * @throws AuthException test fails if this gets thrown since method should succeed
360362 */
361363 @ Test
364+ @ SuppressWarnings ("unchecked" ) // Casts final parameter to Callback to differentiate methods
362365 public void confirmSignIn () throws AuthException {
363366 SignInResult amcResult = new SignInResult (
364367 SignInState .DONE ,
@@ -380,11 +383,11 @@ public void confirmSignIn() throws AuthException {
380383 Callback <SignInResult > callback = invocation .getArgument (1 );
381384 callback .onResult (amcResult );
382385 return null ;
383- }).when (mobileClient ).confirmSignIn (any (String .class ), any ());
386+ }).when (mobileClient ).confirmSignIn (any (String .class ), ( Callback < SignInResult >) any ());
384387
385388 AuthSignInResult result = synchronousAuth .confirmSignIn (CONFIRMATION_CODE );
386389 validateSignInResult (result , true , AuthSignInStep .DONE );
387- verify (mobileClient ).confirmSignIn (eq (CONFIRMATION_CODE ), any ());
390+ verify (mobileClient ).confirmSignIn (eq (CONFIRMATION_CODE ), ( Callback < SignInResult >) any ());
388391 }
389392
390393 /**
0 commit comments