@Test(expected = CloudRuntimeException.class)
public void allocateAndStartTheSystemVmTestInsufficientCapacityException() throws Exception {

    LinkedHashMap<Network, List<? extends NicProfile>> networks = new LinkedHashMap<>();
    AutonomiccsSystemVm autonomiccsSystemVm = Mockito.mock(AutonomiccsSystemVm.class);
    configureAllocateAndStartTheSystemVmTest(networks, autonomiccsSystemVm, null, null, null);
    Mockito.doThrow(Mockito.mock(InsufficientCapacityException.class)).when(virtualMachineManager).allocate(Mockito.anyString(), Mockito.any(VMTemplateVO.class),
            Mockito.any(ServiceOfferingVO.class), Mockito.eq(networks), Mockito.any(DataCenterDeployment.class), Mockito.eq((HypervisorType) null));
    spy.allocateAndStartTheSystemVm(Mockito.mock(VMTemplateVO.class), Mockito.mock(DataCenterDeployment.class), networks, autonomiccsSystemVm);
    verifyAllocateAndStartTheSystemVmTest(networks, autonomiccsSystemVm, (HypervisorType) null, null, null, 0, 0, 0, 0);
}