Rankings implements Serializable { public int maxSize() { return maxSize; } Rankings();  Rankings(int topN);  Rankings(Rankings other); int maxSize(); int size(); List<Rankable> getRankings(); void updateWith(Rankings other); void updateWith(Rankable r); void pruneZeroCounts(); String toString(); Rankings copy();  }
@Test(dataProvider = "legalTopNData") public void constructorWithPositiveTopNShouldBeOk(int topN) { Rankings rankings = new Rankings(topN); assertThat(rankings.maxSize()).isEqualTo(topN); }
@Test public void defaultConstructorShouldSetPositiveTopN() { Rankings rankings = new Rankings(); assertThat(rankings.maxSize()).isGreaterThan(0); }