Add kpm wrap functional tests

parent #936 
Fixed