Revision 57189
Added by Claudio Atzori over 4 years ago
AuthorMergerTestIT.java | ||
---|---|---|
13 | 13 |
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
14 | 14 |
|
15 | 15 |
import java.io.IOException; |
16 |
import java.util.Iterator; |
|
17 | 16 |
import java.util.List; |
18 |
import java.util.stream.Stream; |
|
19 | 17 |
|
20 | 18 |
import static java.util.stream.Collectors.toList; |
21 | 19 |
|
... | ... | |
46 | 44 |
|
47 | 45 |
} |
48 | 46 |
|
49 |
public class StreamIterable<T> implements Iterable<T> { |
|
50 |
|
|
51 |
private final Stream<T> stream; |
|
52 |
|
|
53 |
public StreamIterable(Stream<T> stream) { |
|
54 |
this.stream = stream; |
|
55 |
} |
|
56 |
|
|
57 |
@Override |
|
58 |
public Iterator<T> iterator() { |
|
59 |
return stream.iterator(); |
|
60 |
} |
|
61 |
} |
|
62 |
|
|
63 | 47 |
} |
Also available in: Unified diff
working out NPE during integration test on AbstractAuthorMergerTest.doTestMergeAuthorGroup