}
@Test
public void testReleaseMapping() throws ParseException, EvolizerException{
Release releaseOne = new Release("releaseNameOne");
Release releaseTwo = new Release("releaseNameTwo");
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = df.parse("2006/01/02 01:02:03");
releaseOne.setTimeStamp(date);
releaseTwo.setTimeStamp(date);
ModificationReport modReport = new ModificationReport();
modReport.setAuthor(new Person());
Revision revOne = new Revision("1.1");
Revision revTwo = new Revision("1.2");
Revision revThree= new Revision("1.3");
Revision revFour = new Revision("1.4");
Revision revFive = new Revision("1.5");
//A dummy report otherwise Hibernate throws an eception
revOne.setReport(modReport);
revTwo.setReport(modReport);
revThree.setReport(modReport);revOne.setReport(modReport);
revFour.setReport(modReport);
revFive.setReport(modReport);
releaseOne.addRevision(revOne);
releaseOne.addRevision(revFour);
releaseOne.addRevision(revFive);
releaseTwo.addRevision(revTwo);
releaseTwo.addRevision(revThree);
releaseTwo.addRevision(revOne);
for(Iterator<Revision> iter = releaseOne.getRevisions().iterator();iter.hasNext();){
iter.next().addRelease(releaseOne);
}
for(Iterator<Revision> iter = releaseTwo.getRevisions().iterator();iter.hasNext();){
iter.next().addRelease(releaseTwo);
}
fEvolizerSession.startTransaction();
fEvolizerSession.saveObject(modReport.getAuthor());