// Path: test/org/sagebionetworks/bridge/TestConstants.java
// public static final String TEST_STUDY_IDENTIFIER = "api";


import static com.google.common.base.Preconditions.checkNotNull;
import static org.sagebionetworks.bridge.TestConstants.TEST_STUDY_IDENTIFIER;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.sagebionetworks.bridge.models.CriteriaContext;
import org.sagebionetworks.bridge.models.accounts.AccountId;
import org.sagebionetworks.bridge.models.accounts.SignIn;
import org.sagebionetworks.bridge.models.accounts.StudyParticipant;
import org.sagebionetworks.bridge.models.accounts.UserSession;
import org.sagebionetworks.bridge.models.studies.Study;
import org.sagebionetworks.bridge.models.studies.StudyIdentifier;
import org.sagebionetworks.bridge.models.subpopulations.SubpopulationGuid;
import org.sagebionetworks.bridge.services.AuthenticationService;
import org.sagebionetworks.bridge.services.StudyService;
import org.sagebionetworks.bridge.services.UserAdminService;
import com.google.common.collect.Sets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
            return this;
        }
        public Builder withRoles(Set<Roles> roles) {
            this.roles = Sets.newHashSet(roles);
            return this;
        }
        public Builder withRoles(Roles... roles) {
            this.roles = Sets.newHashSet(roles);
            return this;
        }
        public Builder withDataGroups(Set<String> dataGroups) {
            this.dataGroups = dataGroups;
            return this;
        }
        public Builder withLanguages(List<String> languages) {
            this.languages = languages;
            return this;
        }
        public Builder withEmail(String email) {
            this.email = email;
            return this;
        }
        public Builder withPassword(String password) {
            this.password = password;
            return this;
        }
        public TestUser build() {
            // There are tests where we partially create a user with the builder, then change just
            // some fields before creating another test user with multiple build() calls. Anything we
            // default in thie build method needs to be updated with each call to build().
// Path: test/org/sagebionetworks/bridge/TestConstants.java
// public static final String TEST_STUDY_IDENTIFIER = "api";


// Path: test/org/sagebionetworks/bridge/TestUserAdminHelper.java
import static com.google.common.base.Preconditions.checkNotNull;
import static org.sagebionetworks.bridge.TestConstants.TEST_STUDY_IDENTIFIER;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.sagebionetworks.bridge.models.CriteriaContext;
import org.sagebionetworks.bridge.models.accounts.AccountId;
import org.sagebionetworks.bridge.models.accounts.SignIn;
import org.sagebionetworks.bridge.models.accounts.StudyParticipant;
import org.sagebionetworks.bridge.models.accounts.UserSession;
import org.sagebionetworks.bridge.models.studies.Study;
import org.sagebionetworks.bridge.models.studies.StudyIdentifier;
import org.sagebionetworks.bridge.models.subpopulations.SubpopulationGuid;
import org.sagebionetworks.bridge.services.AuthenticationService;
import org.sagebionetworks.bridge.services.StudyService;
import org.sagebionetworks.bridge.services.UserAdminService;
import com.google.common.collect.Sets;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

            return this;
        }
        public Builder withRoles(Set<Roles> roles) {
            this.roles = Sets.newHashSet(roles);
            return this;
        }
        public Builder withRoles(Roles... roles) {
            this.roles = Sets.newHashSet(roles);
            return this;
        }
        public Builder withDataGroups(Set<String> dataGroups) {
            this.dataGroups = dataGroups;
            return this;
        }
        public Builder withLanguages(List<String> languages) {
            this.languages = languages;
            return this;
        }
        public Builder withEmail(String email) {
            this.email = email;
            return this;
        }
        public Builder withPassword(String password) {
            this.password = password;
            return this;
        }
        public TestUser build() {
            // There are tests where we partially create a user with the builder, then change just
            // some fields before creating another test user with multiple build() calls. Anything we
            // default in thie build method needs to be updated with each call to build().
            Study finalStudy = (study == null) ? studyService.getStudy(TEST_STUDY_IDENTIFIER) : study;