// test reset and contents
Set<CategoryPath> pathsSet = new HashSet<CategoryPath>();
for (int i = 0; i < initialCatgeories.length; i++) {
pathsSet.add(initialCatgeories[i]);
}
stream.reset();
while (stream.incrementToken()) {
CategoryAttribute fromStream = stream
.getAttribute(CategoryAttribute.class);
if (!pathsSet.remove(fromStream.getCategoryPath())) {
fail("Unexpected category path: "