public void shouldRemoveCompletedLinesWhenAbsorbingOtherGlyphsThenMoveAnySegmentsAboveLineDown() {
Junk junk = new Junk(4, 13);
LivingGlyph glyphToCheckThatOnlyWholeLinesAreRemoved = new LivingGlyph(GlyphType.T, CollisionDetector.NULL, 2);
Segments expectedSegments = glyphToCheckThatOnlyWholeLinesAreRemoved.getSegments();
LivingGlyph glyphForWholeLine = new LivingGlyph(GlyphType.I, new CollisionDetector(){
public boolean collides(Segments segments) {
return false;
}}, 1);
glyphForWholeLine.requestRotateLeft(); // now takes up whole row for width 4
glyphForWholeLine.requestMoveDown();
glyphForWholeLine.requestMoveDown();
glyphForWholeLine.requestMoveDown();
glyphForWholeLine.requestMoveDown(); // get it out of the way of the T
junk.absorb(glyphToCheckThatOnlyWholeLinesAreRemoved);
junk.absorb(glyphForWholeLine);
ensureThat(junk.getSegments(), eq(expectedSegments.movedDown())); // absorbs whole row
verifyMocks();
}