// Given...
StubHeartbeat heartbeat = new StubHeartbeat();
Mock glyphFactoryMock = mock(GlyphFactory.class);
LivingGlyph firstGlyph = new LivingGlyph(GlyphType.T, new StubCollisionDetector(13), 3);
LivingGlyph secondGlyph = new LivingGlyph(GlyphType.S, CollisionDetector.NULL, 3);
Junk junk = new Junk(7, 13);
glyphFactoryMock.expects("nextGlyph").inOrder()
.with(new Matcher[] {isA(CollisionDetector.class), isA(ListenerSet.class)})
.will(returnValue(firstGlyph), returnValue(secondGlyph));