CLOUDIFY-1808 add tests and fix some bug relted to multiple service templates