Stream.of(new String[10]) mockito code example Example: mock stream java when(mock.streamMethod()).thenAnswer(invocation -> Stream.of("A", "B"))