@Test public void shouldSetUser() { profileRepository.setUser(MOCK_USER); Mockito.verify(databaseReference).setValue(MOCK_USER); }
public void setUser(User user) { databaseReference.setValue(user); }
ProfileRepository { public void setUser(User user) { databaseReference.setValue(user); } }
ProfileRepository { public void setUser(User user) { databaseReference.setValue(user); } @Inject  ProfileRepository(DatabaseReference databaseReference, FirebaseAuth firebaseAuth); }
ProfileRepository { public void setUser(User user) { databaseReference.setValue(user); } @Inject  ProfileRepository(DatabaseReference databaseReference, FirebaseAuth firebaseAuth); @NonNull LiveData<DataSnapshot> getUser(); void setUser(User user); void setField(UserFieldType userFieldType, String profileField); }
ProfileRepository { public void setUser(User user) { databaseReference.setValue(user); } @Inject  ProfileRepository(DatabaseReference databaseReference, FirebaseAuth firebaseAuth); @NonNull LiveData<DataSnapshot> getUser(); void setUser(User user); void setField(UserFieldType userFieldType, String profileField); @VisibleForTesting
    public FirebaseDatabaseLiveData firebaseDatabaseLiveData; public DatabaseReference databaseReference; }