@@ -0,0 +1,2245 @@
+package com.jraska.vsb.or1.schedule;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Random;%0A%0Aimport static org.hamcrest.core.IsEqual.equalTo;%0Aimport static org.junit.Assert.assertThat;%0Aimport static org.mockito.Mockito.mock;%0A%0Apublic class SelfAdaptiveStrategyTest %7B%0A  //region Test Methods%0A%0A  @Test%0A  public void testFillListAtStart() throws Exception %7B%0A    IObjectiveFunction objectiveFunction = mock(IObjectiveFunction.class);%0A%0A    int size = 111;%0A    SelfAdaptiveSearchStrategy strategy = new SelfAdaptiveSearchStrategy(new Random(), objectiveFunction, size);%0A%0A    strategy.getNext(new int%5B2%5D);%0A%0A    assertThat(strategy.getNeighboursStrategies().size(), equalTo(size - 1)); //-1 because one is used%0A  %7D%0A%0A  @Test%0A  public void testFillsWiningList() throws Exception %7B%0A    SelfAdaptiveSearchStrategy strategy = new SelfAdaptiveSearchStrategy(new GettingBetterFunction());%0A%0A    for (int i = 0, size = strategy.getSize(); i %3C size; i++) %7B%0A      strategy.getNext(new int%5B2%5D);%0A    %7D%0A%0A    assertThat(strategy.getWinningNeighbourStrategies().size(), equalTo(strategy.getSize())); //all should succeed%0A  %7D%0A%0A  @Test%0A  public void testUsesWinningList() throws Exception %7B%0A    SelfAdaptiveSearchStrategy strategy = new SelfAdaptiveSearchStrategy(new GettingBetterFunction());%0A%0A    for (int i = 0, size = strategy.getSize(); i %3C size; i++) %7B%0A      strategy.getNext(new int%5B2%5D);%0A    %7D%0A%0A    ArrayList%3CILocalSearchStrategy%3E winningStrategies = new ArrayList%3CILocalSearchStrategy%3E(strategy.getWinningNeighbourStrategies());%0A%0A    strategy.fillNeighboursList();%0A%0A    assertThat(strategy.getWinningNeighbourStrategies().size(), equalTo(0));%0A%0A    ArrayList%3CILocalSearchStrategy%3E refilledStrategies = new ArrayList%3CILocalSearchStrategy%3E(strategy.getNeighboursStrategies());%0A    for (int i = 0, size = strategy.getSize() / 2; i %3C size; i++) %7B // / 2 because only first part should fit%0A      assertThat(refilledStrategies.get(i), equalTo(winningStrategies.get(i)));%0A    %7D%0A  %7D%0A%0A  //endregion%0A%0A  //region Nested classes%0A%0A  static class GettingBetterFunction implements IObjectiveFunction %7B%0A    private int _counter = Integer.MAX_VALUE;%0A%0A    @Override%0A    public int evaluate(int%5B%5D solution) %7B%0A      return --_counter;%0A    %7D%0A  %7D%0A%0A  //endregion%0A%7D%0A

Add Self adaptive strategy test