you need to mock all the
public class FirestoreClientTest{
@Mock
Firestore firestore;
@Mock
DocumentReference documentReference;
@Mock
CollectionReference collectionReference;
@Mock
ApiFuture apiFuture;
@Mock
QuerySnapshot querySnapshot;
@Test
public void test(){
when(firestore.collection(any(String.class)).thenReturn(collectionReference);
when(collectionReference.document(any(String.class)).thenReturn(documentReference);
when(documentReference.get()).thenReturn(apiFuture);
when(apiFuture.get()).thenReturn(querySnapshot);
UserInfo userInfo = firestore.getUserDetails();
//Assert statements
}
}