### Question:
Auth implements AuthDistribution { @Override public Promise<Void> sendPasswordResetEmail(final String email) { return FuturePromise.when(new Consumer<FuturePromise<Void>>() { @Override public void accept(final FuturePromise<Void> promise) { FirebaseAuth.getInstance().sendPasswordResetEmail(email) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { if (task.isSuccessful()) { promise.doComplete(null); } else { promise.doFail(task.getException()); } } }); } }); }  @Override GdxFirebaseUser getCurrentUser(); @Override Promise<GdxFirebaseUser> createUserWithEmailAndPassword(String email, char[] password); @Override Promise<GdxFirebaseUser> signInWithEmailAndPassword(String email, char[] password); @Override Promise<GdxFirebaseUser> signInWithToken(String token); @Override Promise<GdxFirebaseUser> signInAnonymously(); @Override Promise<Void> signOut(); @Override Promise<Void> sendPasswordResetEmail(final String email);  }### Answer:
@Test public void sendPasswordResetEmail() { Auth auth = new Auth(); Consumer consumer = Mockito.mock(Consumer.class); Mockito.when(task.isSuccessful()).thenReturn(true); Mockito.doReturn(task).when(firebaseAuth).sendPasswordResetEmail(Mockito.anyString()); String arg1 = "email"; auth.sendPasswordResetEmail(arg1).then(consumer); PowerMockito.verifyStatic(FirebaseAuth.class, VerificationModeFactory.times(1)); FirebaseAuth.getInstance(); Mockito.verify(firebaseAuth, VerificationModeFactory.times(1)).sendPasswordResetEmail(Mockito.eq(arg1)); Mockito.verify(consumer, VerificationModeFactory.times(1)).accept(Mockito.any()); }
@Test public void sendPasswordResetEmail_fail() { Auth auth = new Auth(); BiConsumer biConsumer = Mockito.mock(BiConsumer.class); Mockito.when(task.isSuccessful()).thenReturn(false); Mockito.when(task.getException()).thenReturn(new Exception()); Mockito.doReturn(task).when(firebaseAuth).sendPasswordResetEmail(Mockito.anyString()); String arg1 = "email"; auth.sendPasswordResetEmail(arg1).fail(biConsumer); PowerMockito.verifyStatic(FirebaseAuth.class, VerificationModeFactory.times(1)); FirebaseAuth.getInstance(); Mockito.verify(firebaseAuth, VerificationModeFactory.times(1)).sendPasswordResetEmail(Mockito.eq(arg1)); Mockito.verify(biConsumer, VerificationModeFactory.times(1)).accept(Mockito.nullable(String.class), Mockito.any(Exception.class)); }