otherProject = new Project("other", "2");
mockSsid = "abc123";
adminSession = new Session(admin, testProject, mockSsid);
existingUser = new User("joe", "joe", "1234", 2);
existingDefect = new Defect(1, "An existing defect", "", existingUser);
existingDefect.setCreationDate(new Date(0));
existingDefect.setLastModifiedDate(new Date(0));
existingDefect.setEvents(new ArrayList<DefectEvent>());
otherDefect = new Defect(2, "A defect in a different project", "", existingUser);
tag = new Tag("tag");
goodUpdatedDefect = new Defect(1, "A changed title", "A changed description", bob);
goodUpdatedDefect.setAssignee(existingUser);
goodUpdatedDefect.setEvents(new ArrayList<DefectEvent>());
goodUpdatedDefect.getTags().add(tag);
goodUpdatedDefect.setStatus(DefectStatus.CONFIRMED);
defaultSession = new Session(existingUser, testProject, mockSsid);
newDefect = new Defect(-1, "A new defect", "A description", existingUser);
db = new MockData(new HashSet<Object>());
db.save(existingDefect, testProject);
db.save(existingUser);
db.save(otherDefect, otherProject);