FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, cacheType, 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.getWorkingSolution()).thenReturn(workingSolution);
when(solverScope.getWorkingRandom()).thenReturn(workingRandom);
entitySelector.solvingStarted(solverScope);
AbstractSolverPhaseScope phaseScopeA = mock(AbstractSolverPhaseScope.class);
when(phaseScopeA.getSolverScope()).thenReturn(solverScope);
entitySelector.phaseStarted(phaseScopeA);