Minecraft wiki entry for Guardian_farming, associated text: It can be automatic so they die of fall damage or you can flick a lever so they get captured by the water and can get killed by hand for xp.