For my test I need to mock the hasNext() method of my cursos. However to fully test my code i need 250 iterations to send to a bulkRequest. Therefore i need 250 x true and 1 x false at the end.
I created a boolean array filled with 250 true's and 1 false
what i got
@Mock
private Cursor<Record> cursor;
public void myTest(){
when(cursor.hasNext()).thenReturn(true, false);
}
but now I need 250 conditions for cursor so i created a boolean Array but obvoiusly it doesn't compile
final boolean[] cursorsResponses = fillCursors();
when(cursor.hasNext()).thenReturn(cursorsResponses);