@Test public void testWhenGrainPropertiesEmpty() throws Exception { underTest.uploadGrains(Set.of(), List.of(), exitCriteriaModel, saltConnector, exitCriteria); verify(saltCommandRunner, times(0)).runSaltCommand(eq(saltConnector), any(GrainAddRunner.class), eq(exitCriteriaModel), eq(exitCriteria)); }
public void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc, ExitCriteria exitCriteria) throws Exception { if (!grainPropertiesList.isEmpty()) { for (GrainProperties grainProperties : grainPropertiesList) { handleGrainProperties(allNodes, exitModel, sc, exitCriteria, grainProperties); } } }
GrainUploader { public void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc, ExitCriteria exitCriteria) throws Exception { if (!grainPropertiesList.isEmpty()) { for (GrainProperties grainProperties : grainPropertiesList) { handleGrainProperties(allNodes, exitModel, sc, exitCriteria, grainProperties); } } } }
GrainUploader { public void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc, ExitCriteria exitCriteria) throws Exception { if (!grainPropertiesList.isEmpty()) { for (GrainProperties grainProperties : grainPropertiesList) { handleGrainProperties(allNodes, exitModel, sc, exitCriteria, grainProperties); } } }  }
GrainUploader { public void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc, ExitCriteria exitCriteria) throws Exception { if (!grainPropertiesList.isEmpty()) { for (GrainProperties grainProperties : grainPropertiesList) { handleGrainProperties(allNodes, exitModel, sc, exitCriteria, grainProperties); } } }  void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc,
            ExitCriteria exitCriteria); }
GrainUploader { public void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc, ExitCriteria exitCriteria) throws Exception { if (!grainPropertiesList.isEmpty()) { for (GrainProperties grainProperties : grainPropertiesList) { handleGrainProperties(allNodes, exitModel, sc, exitCriteria, grainProperties); } } }  void uploadGrains(Set<Node> allNodes, List<GrainProperties> grainPropertiesList, ExitCriteriaModel exitModel, SaltConnector sc,
            ExitCriteria exitCriteria);  }