Test leave generation