use of com.khartec.waltz.model.authoritativesource.ImmutableAuthoritativeRatingVantagePoint in project waltz by khartec.
the class AuthoritativeSourceResolverTest method getBestRankedIsCorrect.
@Test
public void getBestRankedIsCorrect() {
ImmutableAuthoritativeRatingVantagePoint rank1 = ImmutableAuthoritativeRatingVantagePoint.builder().vantagePoint(vantagePoint).rank(1).dataTypeCode("REF_DATA").applicationId(205L).rating(AuthoritativenessRating.PRIMARY).build();
ImmutableAuthoritativeRatingVantagePoint rank2 = rank1.withRank(2);
Optional<AuthoritativeRatingVantagePoint> bestRanked = AuthoritativeSourceResolver.getBestRanked(ListUtilities.newArrayList(rank1, rank2));
Assert.assertTrue(bestRanked.isPresent());
Assert.assertEquals(rank2, bestRanked.get());
}
Aggregations