@Test(expected = CloudRuntimeException.class)
public void testFindVirtualProviderWithNullVrProvider() {

    // Prepare
    when(mockNetworkModel.getPhysicalNetworkId(deployment.guestNetwork)).thenReturn(PHYSICAL_NW_ID);
    final Type type = Type.VirtualRouter;
    final PhysicalNetworkServiceProviderVO physicalNwSrvProvider = mock(PhysicalNetworkServiceProviderVO.class);
    when(physicalProviderDao.findByServiceProvider(PHYSICAL_NW_ID, type.toString()))
    .thenReturn(physicalNwSrvProvider);
    when(physicalNwSrvProvider.getId()).thenReturn(PROVIDER_ID);
    when(mockVrProviderDao.findByNspIdAndType(PROVIDER_ID, type))
    .thenReturn(null);
    // Execute
    deployment.findVirtualProvider();
}