@Test public void clusterWithNoCpu() { createCommandWithNoCpuName(); when(clusterDao.get(any(Guid.class))).thenReturn(createClusterWithNoCpuName()); when(clusterDao.getByName(anyString())).thenReturn(createClusterWithNoCpuName()); when(glusterVolumeDao.getByClusterId(any(Guid.class))).thenReturn(new ArrayList<>()); allQueriesForVms(); assertTrue(cmd.validate()); }
private void clusterHasGlusterVolumes() { List<GlusterVolumeEntity> volumes = new ArrayList<>(); volumes.add(new GlusterVolumeEntity()); when(glusterVolumeDao.getByClusterId(any(Guid.class))).thenReturn(volumes); }