FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, SelectionCacheType.JUST_IN_TIME, true);
Random workingRandom = mock(Random.class);
when(workingRandom.nextInt(3)).thenReturn(1, 0, 0, 2, 1, 2, 2, 1, 0);
DefaultSolverScope solverScope = mock(DefaultSolverScope.class);
when(solverScope.getWorkingRandom()).thenReturn(workingRandom);
entitySelector.solvingStarted(solverScope);
AbstractPhaseScope phaseScopeA = mock(AbstractPhaseScope.class);
when(phaseScopeA.getSolverScope()).thenReturn(solverScope);
when(phaseScopeA.getScoreDirector()).thenReturn(scoreDirector);