How do you get a zombie into a minecart?

How do you get a zombie into a minecart?
Description

Spawn a villager.
Place a bed and workstation block.
Wait for the villager to link up to the workstation.
Break the workstation block.
Turn the villager into a zombie villager.
Place a minecart or boat nearby and try to get the zombie villager to enter it.

Description
  1. Spawn a villager.
  2. Place a bed and workstation block.
  3. Wait for the villager to link up to the workstation.
  4. Break the workstation block.
  5. Turn the villager into a zombie villager.
  6. Place a minecart or boat nearby and try to get the zombie villager to enter it.