[TEST] Make type inference simpler

This commit is contained in:
Simon Willnauer 2016-03-30 16:38:07 +02:00
parent 43b87e8f86
commit e25ccb91ae
1 changed files with 6 additions and 4 deletions

View File

@ -236,10 +236,12 @@ public class InnerHitBuilderTests extends ESTestCase {
})); }));
break; break;
case 9: case 9:
copy.setSorts(randomValueOtherThan(copy.getSorts(), () -> { final List<SortBuilder<?>> sortBuilders = randomValueOtherThan(copy.getSorts(), () -> {
return randomListStuff(16, List<SortBuilder<?>> builders = randomListStuff(16,
() -> SortBuilders.fieldSort(randomAsciiOfLengthBetween(5, 20)).order(randomFrom(SortOrder.values()))); () -> SortBuilders.fieldSort(randomAsciiOfLengthBetween(5, 20)).order(randomFrom(SortOrder.values())));
})); return builders;
});
copy.setSorts(sortBuilders);
break; break;
case 10: case 10:
copy.setHighlightBuilder(randomValueOtherThan(copy.getHighlightBuilder(), copy.setHighlightBuilder(randomValueOtherThan(copy.getHighlightBuilder(),