This is what I did in my last applicaiton in the similar scenario.
1. Get all values from Test Data and covert it all into Comma Seperated Value String.
e.g. County1, County2, Country3 ... save it as TDString
2. Get all values from the dropdown and covert it all into Comma Seperated Value String.
e.g. Country1, Country2, country3 .. save it as ActualString
Now compare two string,
TDString.equal(ActualString);
This way, you will be able to compare that all data are equal in TestData. Number of countries match. Also, it will make sure that case matches.
Also, you can use ArrayList to compare.
import java.util.ArrayList;
public class ComparingList {
public static void main(String[] args) {
ArrayList<String> list1 = new ArrayList<String>();
list1.add("Country"); //Add all countries from TestData
ArrayList<String> list2 = new ArrayList<String>();
list2.add("Country"); //Add all countries from DropDown
assertEquals(list1, list2);
}
}
Hope that helps.