final Assignment a = newAssignment("a", -1, 1);
final Assignment b = newAssignment("b", -1, 1);
final Assignment c = newAssignment("c", -1, 1);
ConflictMatrix matrix = new ConflictMatrix(slotsPerWeek, slotsPerDay);
Map<Resource, Set<Assignment>> resources = newResources(Arrays.asList(a, b), Arrays.asList(a, c));
matrix.initFromResources(resources);
Location loc1 = new Location(10);
Location loc2 = new Location(5);
List locations = Arrays.asList(loc1, loc2);
periode = newPeriod(slotsPerWeek, locations, matrix);
assertTrue(periode.add(b, 0));
assertEquals(loc1, b.getLocation());
assertTrue(periode.add(c, 1));
assertEquals(loc1, c.getLocation());
periode.add(a, -1);
// no more free slots are available for event A
assertEquals(-1, matrix.getConflictingRaster(a).getLastFreePlus1(0));
// but we could injectAt event A, if we allow moving at least one colliding event
int depth = 1;
int collidingAssignments = 0;
assertEquals(false, periode.inject(a, depth, collidingAssignments));