/** Next low number guess test. */ @Test public void nextLowNumberGuessTest() { when(rangeGenerator.generateRange(4)).thenReturn(new Range(16, 32)); long nextHighNumber = nextGuess.nextLowNumber(16); assertThat(nextHighNumber, is(16L)); verify(rangeGenerator).generateRange(4); }
/** Next high number guess test. */ @Test public void nextHighNumberGuessTest() { when(rangeGenerator.generateRange(6)).thenReturn(new Range(64, 128)); long nextHighNumber = nextGuess.nextHighNumber(64); assertThat(nextHighNumber, is(128L)); verify(rangeGenerator).generateRange(6); }