public class TypeSafeCollectionsTest extends TestCase {
public void testTypeSafeList() {
Constructor constructor = new Constructor(Car.class);
TypeDescription carDescription = new TypeDescription(Car.class);
carDescription.putListPropertyType("wheels", Wheel.class);
constructor.addTypeDescription(carDescription);
Yaml yaml = new Yaml(constructor);
Car car = (Car) yaml.load(Util.getLocalResource("constructor/car-no-root-class.yaml"));
assertEquals("12-XP-F4", car.getPlate());
List<Wheel> wheels = car.getWheels();