assertEquals(4, ((List) o[1]).get(1));
//assertEquals((Object) new int[] { 1, 2 }, (Object) service.convert(Arrays.asList(1, 2), int[].class));
}
public void testCustom() throws Exception {
AggregateConverter s = new AggregateConverter(new TestBlueprintContainer(null));
s.registerConverter(new RegionConverter());
s.registerConverter(new EuRegionConverter());
// lookup on a specific registered converter type
Object result;
result = s.convert(new Object(), Region.class);
assertTrue(result instanceof Region);
assertFalse(result instanceof EuRegion);
result = s.convert(new Object(), EuRegion.class);
assertTrue(result instanceof EuRegion);
// find first converter that matches the type
s = new AggregateConverter(new TestBlueprintContainer(null));
s.registerConverter(new AsianRegionConverter());
s.registerConverter(new EuRegionConverter());
s.registerConverter(new NullMarkerConverter());
result = s.convert(new Object(), Region.class);