counters.addCounterGroup(new CounterGroup("B")
.addCounter(new Counter("XX", 11))
.addCounter(new Counter("YY", 22))
);
MSubmission source = new MSubmission();
source.setCounters(counters);
Counters target;
CounterGroup group;
Counter counter;
target = transfer(source).getCounters();
group = target.getCounterGroup("A");
assertNotNull(group);
counter = group.getCounter("X");
assertNotNull(counter);
assertEquals(1, counter.getValue());
counter = group.getCounter("Y");
assertNotNull(counter);
assertEquals(2, counter.getValue());
target = transfer(source).getCounters();
group = target.getCounterGroup("B");
assertNotNull(group);
counter = group.getCounter("XX");
assertNotNull(counter);
assertEquals(11, counter.getValue());
counter = group.getCounter("YY");
assertNotNull(counter);
assertEquals(22, counter.getValue());
Counters countersx = new Counters();
countersx.addCounterGroup(new CounterGroup("C")
.addCounter(new Counter("XXX", 111))
.addCounter(new Counter("YYY", 222))
);
countersx.addCounterGroup(new CounterGroup("D")
.addCounter(new Counter("XXXX", 1111))
.addCounter(new Counter("YYYY", 2222))
);
Counters countersy = new Counters();
countersy.addCounterGroup(new CounterGroup("E")
.addCounter(new Counter("XXXXX", 11111))
.addCounter(new Counter("YYYYY", 22222))
);
countersy.addCounterGroup(new CounterGroup("F")
.addCounter(new Counter("XXXXXX", 111111))
.addCounter(new Counter("YYYYYY", 222222))
);
List<MSubmission> sources = new ArrayList<MSubmission>();
MSubmission sourcex = new MSubmission();
sourcex.setCounters(countersx);
sources.add(sourcex);
MSubmission sourcey = new MSubmission();
sourcey.setCounters(countersy);
sources.add(sourcey);
List<MSubmission> targets = transfer(sources);
assertNotNull(targets.get(0));
target = targets.get(0).getCounters();