I have the following code
int testInt = 2;
String stringArg = "test";
List<Activity> activityList = new ArrayList<Activity>();
//activityList.add(new Activity(testInt, testInt, testInt, null, null, null, stringArg, stringArg));
//activityList.add(new Activity(testInt, testInt, testInt, null, null, null, stringArg, stringArg));
Activities activities = new Activities(activityList);
I want to test to see that it is the same after marshalling(ie first marshal then unmarshal). The code above fails. I have implemented equals and hashCode that I believe is right.
If I pass null instead of activityList or my activityList is not empty everything works, but if the list is empty my equals method doesnt work anymore.
Maybe someone know what is causing this? I have a idea that it has something to do with xml.
I am using jaxb.