[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;
case 9:
copy.setSorts(randomValueOtherThan(copy.getSorts(), () -> {
return randomListStuff(16,
() -> SortBuilders.fieldSort(randomAsciiOfLengthBetween(5, 20)).order(randomFrom(SortOrder.values())));
}));
final List<SortBuilder<?>> sortBuilders = randomValueOtherThan(copy.getSorts(), () -> {
List<SortBuilder<?>> builders = randomListStuff(16,
() -> SortBuilders.fieldSort(randomAsciiOfLengthBetween(5, 20)).order(randomFrom(SortOrder.values())));
return builders;
});
copy.setSorts(sortBuilders);
break;
case 10:
copy.setHighlightBuilder(randomValueOtherThan(copy.getHighlightBuilder(),