Make LocalizedString constructors private and replace Scala test class with Java test class.