manager.addStrategy(mockedStrat2, 0.6);
}
@Test
public void whenRandomDices_0point1_returnsStrategy1(){
SearchStrategyManager managerUnderTest = new SearchStrategyManager();
SearchStrategy mockedStrategy1 = mock(SearchStrategy.class);
SearchStrategy mockedStrategy2 = mock(SearchStrategy.class);
managerUnderTest.addStrategy(mockedStrategy1, 0.2);
managerUnderTest.addStrategy(mockedStrategy2, 0.8);
Random mockedRandom = mock(Random.class);
managerUnderTest.setRandom(mockedRandom);
stub(mockedRandom.nextDouble()).toReturn(0.1);
assertThat(managerUnderTest.getRandomStrategy(), is(mockedStrategy1));
}