VehicleFactory { public static VehicleData vehicleData(String name, int capacity) { return new VehicleData(name, capacity); } private  VehicleFactory(); static VehicleData vehicleData(String name, int capacity); static Vehicle createVehicle(long id, String name, int capacity); static Vehicle testVehicle(long id);  }
@Test void vehicleData() { String name = "vehicle name"; int capacity = 1000; VehicleData vehicleData = VehicleFactory.vehicleData(name, capacity); assertThat(vehicleData.name()).isEqualTo(name); assertThat(vehicleData.capacity()).isEqualTo(capacity); }