@Before public void beforeEveryMethodExecutes() throws Exception { for (int i = 0; i < RESEARCHES_COUNT; i++) { users.loginAsTeacher(); groupIds[i] = surveys.createGroup( group("group" + i).withEvaluator(EVALUATOR_EMAIL).withStudent(STUDENT_EMAIL)); users.loginAsEvaluator(); templateIds[i] = surveys.createTemplate(template("template" + i).withQuestions(openQuestion("question"))); surveys.createResearch(research().withSurvey(templateIds[i]).forGroup(groupIds[i])); } }