// should only contain 2 SomeOtherVO's. It has something to do with specifying the field name starting with cap in
// the mapping file. If
// you change the field mapping to start with lower case it seems to map correctly.
Mapper mapper = getMapper(new String[] { "setMappingWithUpperCaseFieldName.xml" });
SomeDTO someDto = newInstance(SomeDTO.class);
someDto.setField1(new Integer("1"));
SomeOtherDTO someOtherDto = newInstance(SomeOtherDTO.class);
someOtherDto.setOtherField2(someDto);
someOtherDto.setOtherField3("value1");
SomeDTO someDto2 = newInstance(SomeDTO.class);
someDto2.setField1(new Integer("2"));
SomeOtherDTO someOtherDto2 = newInstance(SomeOtherDTO.class);
someOtherDto2.setOtherField2(someDto2);
someOtherDto2.setOtherField3("value2");
SomeDTO src = newInstance(SomeDTO.class);
src.setField2(new SomeOtherDTO[] { someOtherDto2, someOtherDto });
SomeVO dest = mapper.map(src, SomeVO.class);
assertEquals("incorrect resulting set size", src.getField2().length, dest.getField2().size());
// TODO: add more asserts
}