}
@Test(dataProvider="getAbbreviationsTests")
public void testGetAbbreviations(String s, String[] expectedPhrases) {
AbbreviationsManager manager = new AbbreviationsManager(defaultProperties);
Abbreviations abbrev = manager.getAbbreviations(s);
assertEquals(abbrev.getValue(), s);
assertEquals(abbrev.getPhrases().size(), expectedPhrases.length);
for (int i=0; i<abbrev.getPhrases().size(); ++i) {
String phrase = abbrev.getPhrases().get(i);
assertEquals(phrase, expectedPhrases[i]);
List<String> alternatives = abbrev.getAbbreviations(phrase);
List<String> expectedAlternatives = manager.getAlternatives(abbrev.getPhrases().get(i));
assertTrue(alternatives.size() >= 1);
assertEquals(alternatives.size(), expectedAlternatives.size());
assertEquals(alternatives.get(0), abbrev.getPhrases().get(i));
}
}