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