Pester mocking azure cmdlets

I am trying out Pester for the unit testing. Is there better another way to test this or am I doing completely wrong?
Here is the function I need to test for unit testing.

Function Add-SubnetToVNet{
        $PSVnet = Get-AzVirtualNetwork -ResourceGroupName $ResourceGroupName -Name $VNetName
        Add-AzVirtualNetworkSubnetConfig -Name $SubnetName -AddressPrefix $AddressPrefix -VirtualNetwork $PSVnet        
        Set-AzVirtualNetwork -VirtualNetwork $PSVnet

Here is the Pester test describe block.

Describe 'Add-SubnetToVNet'{
	Mock -CommandName 'Get-AzVirtualNetwork' -MockWith{
		$VnetObj = New-Object Microsoft.Azure.Commands.Network.Models.PSVirtualNetwork
		$VnetObj.Name              = 'VNet-Name'
		$VnetObj.ResourceGroupName = 'RG-VNet-Name'
		$VnetObj.Location          = 'uksouth'           
		return $VnetObj
	Mock -CommandName 'Add-AzVirtualNetworkSubnetConfig'-MockWith{            
		$SubnetObj = New-Object Microsoft.Azure.Commands.Network.Models.PSSubnet
		$SubnetObj.Name = 'New-Subnet'
		$SubnetObj.Id   = '/subcriptions/random-guid-here/resourceGroups/RG-VNet-Name/Subnet-Name'
		$SubnetObj.ProvisioningState = 'Succeeded'
		$SubnetObj.AddressPrefix     = ''
		return ($SubnetObj)
	Mock -CommandName 'Set-AzVirtualNetwork' -MockWith{	
		return $VnetObj
	$TestVnet = Add-SubnetToVNet -SubnetName 'New-Subnet' -AddressPrefix '' -ResourceGroupName 'RG-VNet-Name' -VNetName 'VNet-Name'
	It 'Should return a VNet with a subnet'{
		$TestVnet = Add-SubnetToVNet -SubnetName 'New-Subnet' -AddressPrefix '' -ResourceGroupName 'RG-VNet-Name' -VNetName 'VNet-Name'            
		$TestVnet.Subnets | Should Not Be $null

It said the virtual network was null and the test failed.

I have got this now. Just follow the pattern on the mock from this link.

Thanks for sharing the update/solution here.