class AutonomiccsSystemVmDeploymentService implements InitializingBean {

    protected NetworkVO getDefaultNetwork(long dataCenterId) {
        DataCenterVO dc = dataCenterDao.findById(dataCenterId);
        if (dc.getNetworkType() == NetworkType.Advanced && dc.isSecurityGroupEnabled()) {
            return getDefaultNetworkForAdvancedNetworkingWithSecurityGroupds(dataCenterId, dc);
        }
        return getDefaultNetwork(dc);
    }

}

class AutonomiccsSystemVmDeploymentServiceTest {

    private final String commandToInstallOpenJDK7;
    private final int ONE_MEGABYTE_IN_BYTES;
    @Spy
    @InjectMocks
    private AutonomiccsSystemVmDeploymentService spy;
    @Mock
    private ServiceOfferingVO autonomiccsSystemVmServiceOffering;
    @Mock
    private SshUtils sshUtils;
    @Mock
    private AutonomiccsSystemVmTemplateService autonomiccsSystemVmTemplateService;
    @Mock
    private AutonomiccsSystemVmDao autonomiccsSystemVmDao;
    @Mock
    private HostService hostService;
    @Mock
    private ConfigurationDao configurationDao;
    @Mock
    private DataCenterDao dataCenterDao;
    @Mock
    private AccountManager accountManager;
    @Mock
    private NetworkDao networkDao;
    @Mock
    private NetworkModel networkModel;
    @Mock
    private NetworkOfferingDao networkOfferingDao;
    @Mock
    private NetworkOrchestrationService networkManager;
    @Mock
    private VirtualMachineManager virtualMachineManager;
    @Mock
    private AutonomiccsServiceOfferingService autonomiccsServiceOfferingService;
    @Mock
    private HostUtils hostUtils;
    @Mock
    private ThreadUtils threadUtils;
    @Mock
    private ClusterService clusterService;
    @Mock
    private HostResourcesService hostResourcesService;
    @Mock
    private PodService podService;
    @Mock
    private ZoneService zoneService;

    @Test
    public void getDefaultNetworkTestNetworkTypeNotAdvanced() {

        NetworkVO network = Mockito.mock(NetworkVO.class);
        NetworkVO network2 = Mockito.mock(NetworkVO.class);
        DataCenterVO dc = configureGetDefaultNetworkTest(NetworkType.Basic, true, network, network2);

        NetworkVO result = spy.getDefaultNetwork(0l);

        verifyGetDefaultNetworkTest(dc, network2, result, 0, 0, 1);
    }

}