Defect otherDefect;
Project otherProject;
@Before
public void setUp() {
invalidUser = new User("idontexist", "blah", "1234", 99);
tag = new Tag("tag");
bob = new User("bob", "bob", "1234", 1);
existingUser = new User("joe", "joe", "1234", 2);
existingDefect = new Defect(1, "An existing defect", "", bob);
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", "", bob);
otherProject = new Project("other", "2");
testProject = new Project("test", "1");
mockSsid = "abc123";
defaultSession = new Session(bob, testProject, mockSsid);
//need copies to simulate db4o cross-container problem
tagCopy = new Tag("tag");
bobCopy = new User(null, "bob", null, -1);
goodNewDefect = new Defect(-1, "This is a good title", "", bobCopy);
goodNewDefect.setAssignee(bobCopy);
goodNewDefect.getTags().add(tagCopy);
goodNewDefect.setStatus(DefectStatus.CONFIRMED); // ignored
ignoredEvents = new ArrayList<DefectEvent>();
goodNewDefect.setEvents(ignoredEvents); // ignored
existingUserCopy = new User(null, "joe", null, -1);
goodUpdatedDefect = new Defect(1, "A changed title", "A changed description", bobCopy);
goodUpdatedDefect.setAssignee(existingUserCopy);
goodUpdatedDefect.setEvents(new ArrayList<DefectEvent>());
goodUpdatedDefect.getTags().add(tagCopy);
goodUpdatedDefect.setStatus(DefectStatus.CONFIRMED);