private LocalizedString usString;
private LocalizedString ukString;
private LocalizedString caString;
public void testAddLocalizedString() throws JAXRException {
InternationalString is = new InternationalStringImpl(Locale.US, "USA", LocalizedString.DEFAULT_CHARSET_NAME);
Collection localizedStrings = is.getLocalizedStrings();
assertEquals(1, localizedStrings.size());
assertTrue(localizedStrings.contains(usString));
is.addLocalizedString(ukString);
localizedStrings = is.getLocalizedStrings();
assertEquals(2, localizedStrings.size());
assertTrue(localizedStrings.contains(usString));
assertTrue(localizedStrings.contains(ukString));
// add again and see that we overwrite
is.addLocalizedString(ukString);
localizedStrings = is.getLocalizedStrings();
assertEquals(2, localizedStrings.size());
assertTrue(localizedStrings.contains(usString));
assertTrue(localizedStrings.contains(ukString));
}