Add a test and fix issues with KVM MAC generator function (OMS-524)