| //given
Car car1 = new Car(
"Morris",
2,
new GregorianCalendar( 1980, 0, 1 ).getTime(),
new Person( "Bob" ),
new ArrayList<Person>()
);
Car car2 = new Car(
"Railton",
4,
new GregorianCalendar( 1934, 0, 1 ).getTime(),
new Person( "Bill" ),
new ArrayList<Person>()
);
//when
List<CarDto> dtos = CarMapper.INSTANCE.carsToCarDtos( new ArrayList<Car>( Arrays.asList( car1, car2 ) ) );
|