gradebookng/tool/src/test/org/sakaiproject/gradebookng/business/util/TestImportGradesHelper.java
private List<GbStudentGradeInfo> mockExistingStudentGrades() {
		final List<GbStudentGradeInfo> grades = new ArrayList<GbStudentGradeInfo>();

		final User user1 = Mockito.mock(User.class);
		Mockito.when(user1.getId()).thenReturn("user1");
		Mockito.when(user1.getEid()).thenReturn("user1");
		final GbStudentGradeInfo studentGradeInfo1 = new GbStudentGradeInfo(user1);
		final GradeDefinition gradeDefinition1 = new GradeDefinition();
		gradeDefinition1.setGrade("1");
		gradeDefinition1.setGradeComment("comment 1");
		studentGradeInfo1.addGrade(1L, new GbGradeInfo(gradeDefinition1));
		grades.add(studentGradeInfo1);

		final GbStudentGradeInfo studentGradeInfo2 = new GbStudentGradeInfo(user1);
		final GradeDefinition gradeDefinition2 = new GradeDefinition();
		gradeDefinition2.setGrade("2");
		gradeDefinition2.setGradeComment("comment 2");
		studentGradeInfo2.addGrade(2L, new GbGradeInfo(gradeDefinition2));
		grades.add(studentGradeInfo2);

		final User user2 = Mockito.mock(User.class);
		Mockito.when(user2.getId()).thenReturn("user2");
		Mockito.when(user2.getEid()).thenReturn("user2");
		final GbStudentGradeInfo studentGradeInfo3 = new GbStudentGradeInfo(user2);
		final GradeDefinition gradeDefinition3 = new GradeDefinition();
		gradeDefinition3.setGrade("5");
		gradeDefinition3.setGradeComment("comment 12");
		studentGradeInfo3.addGrade(1L, new GbGradeInfo(gradeDefinition3));
		grades.add(studentGradeInfo3);

		final GbStudentGradeInfo studentGradeInfo4 = new GbStudentGradeInfo(user2);
		final GradeDefinition gradeDefinition4 = new GradeDefinition();
		gradeDefinition4.setGrade("6");
		gradeDefinition4.setGradeComment("comment 22");
		studentGradeInfo4.addGrade(2L, new GbGradeInfo(gradeDefinition4));
		grades.add(studentGradeInfo4);

		return grades;
	}
/**
	 * Mock up some existing student grade data
	 *
	 * @return
	 */
Mock up some existing student grade data
@return
Mock up some existing student grade data @return
private List<GbStudentGradeInfo> mockExistingStudentGrades() {
		final List<GbStudentGradeInfo> grades = new ArrayList<GbStudentGradeInfo>();
		final User user1 = Mockito.mock(User.class);
		Mockito.when(user1.getId()).thenReturn("user1");
		Mockito.when(user1.getEid()).thenReturn("user1");
		final GbStudentGradeInfo studentGradeInfo1 = new GbStudentGradeInfo(user1);
		final GradeDefinition gradeDefinition1 = new GradeDefinition();
		gradeDefinition1.setGrade("1");
		gradeDefinition1.setGradeComment("comment 1");
		studentGradeInfo1.addGrade(1L, new GbGradeInfo(gradeDefinition1));
		grades.add(studentGradeInfo1);
		final GbStudentGradeInfo studentGradeInfo2 = new GbStudentGradeInfo(user1);
		final GradeDefinition gradeDefinition2 = new GradeDefinition();
		gradeDefinition2.setGrade("2");
		gradeDefinition2.setGradeComment("comment 2");
		studentGradeInfo2.addGrade(2L, new GbGradeInfo(gradeDefinition2));
		grades.add(studentGradeInfo2);
		final User user2 = Mockito.mock(User.class);
		Mockito.when(user2.getId()).thenReturn("user2");
		Mockito.when(user2.getEid()).thenReturn("user2");
		final GbStudentGradeInfo studentGradeInfo3 = new GbStudentGradeInfo(user2);
		final GradeDefinition gradeDefinition3 = new GradeDefinition();
		gradeDefinition3.setGrade("5");
		gradeDefinition3.setGradeComment("comment 12");
		studentGradeInfo3.addGrade(1L, new GbGradeInfo(gradeDefinition3));
		grades.add(studentGradeInfo3);
		final GbStudentGradeInfo studentGradeInfo4 = new GbStudentGradeInfo(user2);
		final GradeDefinition gradeDefinition4 = new GradeDefinition();
		gradeDefinition4.setGrade("6");
		gradeDefinition4.setGradeComment("comment 22");
		studentGradeInfo4.addGrade(2L, new GbGradeInfo(gradeDefinition4));
		grades.add(studentGradeInfo4);
		return grades;
	}
private List < GbStudentGradeInfo > mockExistingStudentGrades ( ) { final List < GbStudentGradeInfo > grades = new ArrayList < GbStudentGradeInfo > ( ) ; final User user1 = Mockito . mock ( User . class ) ; Mockito . when ( user1 . getId ( ) ) . thenReturn ( "user1" ) ; Mockito . when ( user1 . getEid ( ) ) . thenReturn ( "user1" ) ; final GbStudentGradeInfo studentGradeInfo1 = new GbStudentGradeInfo ( user1 ) ; final GradeDefinition gradeDefinition1 = new GradeDefinition ( ) ; gradeDefinition1 . setGrade ( "1" ) ; gradeDefinition1 . setGradeComment ( "comment 1" ) ; studentGradeInfo1 . addGrade ( 1L , new GbGradeInfo ( gradeDefinition1 ) ) ; grades . add ( studentGradeInfo1 ) ; final GbStudentGradeInfo studentGradeInfo2 = new GbStudentGradeInfo ( user1 ) ; final GradeDefinition gradeDefinition2 = new GradeDefinition ( ) ; gradeDefinition2 . setGrade ( "2" ) ; gradeDefinition2 . setGradeComment ( "comment 2" ) ; studentGradeInfo2 . addGrade ( 2L , new GbGradeInfo ( gradeDefinition2 ) ) ; grades . add ( studentGradeInfo2 ) ; final User user2 = Mockito . mock ( User . class ) ; Mockito . when ( user2 . getId ( ) ) . thenReturn ( "user2" ) ; Mockito . when ( user2 . getEid ( ) ) . thenReturn ( "user2" ) ; final GbStudentGradeInfo studentGradeInfo3 = new GbStudentGradeInfo ( user2 ) ; final GradeDefinition gradeDefinition3 = new GradeDefinition ( ) ; gradeDefinition3 . setGrade ( "5" ) ; gradeDefinition3 . setGradeComment ( "comment 12" ) ; studentGradeInfo3 . addGrade ( 1L , new GbGradeInfo ( gradeDefinition3 ) ) ; grades . add ( studentGradeInfo3 ) ; final GbStudentGradeInfo studentGradeInfo4 = new GbStudentGradeInfo ( user2 ) ; final GradeDefinition gradeDefinition4 = new GradeDefinition ( ) ; gradeDefinition4 . setGrade ( "6" ) ; gradeDefinition4 . setGradeComment ( "comment 22" ) ; studentGradeInfo4 . addGrade ( 2L , new GbGradeInfo ( gradeDefinition4 ) ) ; grades . add ( studentGradeInfo4 ) ; return grades ; }
Mock up some existing student grade data
 @return
Mock up some existing student grade data @return