I have following class to test:
public class UsersHolder {
private Set<User> users = new HashSet<>();
///
}
inside test class I write:
@Spy
private UsersHolder usersHolder = new UsersHolder();
But I have not ideas how to inject mock of User into list inside UserHolder.
Aucun commentaire:
Enregistrer un commentaire