PlanningEntityDescriptor entityDescriptor = TestdataChainedEntity.buildEntityDescriptor();
PlanningVariableDescriptor variableDescriptor = entityDescriptor.getPlanningVariableDescriptor("chainedObject");
ScoreDirector scoreDirector = mock(ScoreDirector.class);
TestdataChainedAnchor a0 = new TestdataChainedAnchor("a0");
TestdataChainedEntity a1 = new TestdataChainedEntity("a1", a0);
TestdataChainedEntity a2 = new TestdataChainedEntity("a2", a1);
TestdataChainedEntity a3 = new TestdataChainedEntity("a3", a2);
TestdataChainedEntity a4 = new TestdataChainedEntity("a4", a3);
TestdataChainedEntity a5 = new TestdataChainedEntity("a5", a4);
TestdataChainedAnchor b0 = new TestdataChainedAnchor("b0");
TestdataChainedEntity b1 = new TestdataChainedEntity("b1", b0);
TestdataChainedEntity b2 = new TestdataChainedEntity("b2", b1);
TestdataChainedEntity b3 = new TestdataChainedEntity("b3", b2);
SelectorTestUtils.mockMethodGetTrailingEntity(scoreDirector, variableDescriptor,
new TestdataChainedEntity[]{a1, a2, a3, a4, a5, b1, b2, b3});
SubChainSwapMove move = new SubChainSwapMove(variableDescriptor, new SubChain(Arrays.<Object>asList(a3, a4, a5)),