@Test
public void testDontRemoveDhcpServiceFromDomainRouter() {

    // make local mocks
    VirtualMachineProfile vm =  mock(VirtualMachineProfile.class);
    NicVO nic = mock(NicVO.class);
    NetworkVO network = mock(NetworkVO.class);
    // make sure that release dhcp won't be called
    when(vm.getType()).thenReturn(Type.DomainRouter);
    when(network.getGuruName()).thenReturn(guruName);
    when(testOrchastrator._networksDao.findById(nic.getNetworkId())).thenReturn(network);
    testOrchastrator.removeNic(vm, nic);
    verify(nic, times(1)).setState(Nic.State.Deallocating);
    verify(testOrchastrator._networkModel, never()).getElementImplementingProvider(dhcpProvider);
    verify(testOrchastrator._ntwkSrvcDao, never()).getProviderForServiceInNetwork(network.getId(), Service.Dhcp);
    verify(testOrchastrator._networksDao, times(1)).findById(nic.getNetworkId());
}