SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1});
SubChainChangeMove move = new SubChainChangeMove(new SubChain(Arrays.<Object>asList(a2, a3, a4)),
variableDescriptor, b0);
Move undoMove = move.createUndoMove(scoreDirector);
move.doMove(scoreDirector);
SelectorTestUtils.assertChain(a0, a1, a5);
SelectorTestUtils.assertChain(b0, a2, a3, a4, b1);
verify(scoreDirector).beforeVariableChanged(a5, "chainedObject");
verify(scoreDirector).afterVariableChanged(a5, "chainedObject");
verify(scoreDirector).beforeVariableChanged(a2, "chainedObject");
verify(scoreDirector).afterVariableChanged(a2, "chainedObject");
verify(scoreDirector).beforeVariableChanged(a3, "chainedObject");
verify(scoreDirector).afterVariableChanged(a3, "chainedObject");
verify(scoreDirector).beforeVariableChanged(a4, "chainedObject");
verify(scoreDirector).afterVariableChanged(a4, "chainedObject");
verify(scoreDirector).beforeVariableChanged(b1, "chainedObject");
verify(scoreDirector).afterVariableChanged(b1, "chainedObject");
undoMove.doMove(scoreDirector);
SelectorTestUtils.assertChain(a0, a1, a2, a3, a4, a5);
SelectorTestUtils.assertChain(b0, b1);
}