@@ -58,13 +58,13 @@ protected void afterEach() throws Exception {
5858 }
5959
6060 @ Test
61- public void prepare_ParallelPreparationNotEnabled_ShouldExecuteTasksSerially ()
61+ public void prepareRecords_ParallelPreparationNotEnabled_ShouldExecuteTasksSerially ()
6262 throws ExecutionException , ValidationConflictException , CrudException {
6363 // Arrange
6464 when (config .isParallelPreparationEnabled ()).thenReturn (false );
6565
6666 // Act
67- parallelExecutor .prepare (tasks , TX_ID );
67+ parallelExecutor .prepareRecords (tasks , TX_ID );
6868
6969 // Assert
7070 verify (task , times (tasks .size ())).run ();
@@ -73,36 +73,36 @@ public void prepare_ParallelPreparationNotEnabled_ShouldExecuteTasksSerially()
7373
7474 @ Test
7575 public void
76- prepare_ParallelPreparationNotEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
76+ prepareRecords_ParallelPreparationNotEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
7777 throws ExecutionException , ValidationConflictException , CrudException {
7878 // Arrange
7979 when (config .isParallelPreparationEnabled ()).thenReturn (false );
8080 doThrow (ExecutionException .class ).when (task ).run ();
8181
8282 // Act Assert
83- assertThatThrownBy (() -> parallelExecutor .prepare (tasks , TX_ID ))
83+ assertThatThrownBy (() -> parallelExecutor .prepareRecords (tasks , TX_ID ))
8484 .isInstanceOf (ExecutionException .class );
8585
8686 verify (task , only ()).run ();
8787 verify (parallelExecutorService , never ()).execute (any ());
8888 }
8989
9090 @ Test
91- public void prepare_ParallelPreparationEnabled_ShouldExecuteTasksInParallel ()
91+ public void prepareRecords_ParallelPreparationEnabled_ShouldExecuteTasksInParallel ()
9292 throws ExecutionException , ValidationConflictException , CrudException {
9393 // Arrange
9494 when (config .isParallelPreparationEnabled ()).thenReturn (true );
9595
9696 // Act
97- parallelExecutor .prepare (tasks , TX_ID );
97+ parallelExecutor .prepareRecords (tasks , TX_ID );
9898
9999 // Assert
100100 verify (task , times (tasks .size ())).run ();
101101 verify (parallelExecutorService , times (tasks .size ())).execute (any ());
102102 }
103103
104104 @ Test
105- public void prepare_ParallelPreparationEnabled_SingleTaskGiven_ShouldExecuteTasksSerially ()
105+ public void prepareRecords_ParallelPreparationEnabled_SingleTaskGiven_ShouldExecuteTasksSerially ()
106106 throws ExecutionException , ValidationConflictException , CrudException {
107107 // Arrange
108108 when (config .isParallelPreparationEnabled ()).thenReturn (true );
@@ -111,7 +111,7 @@ public void prepare_ParallelPreparationEnabled_SingleTaskGiven_ShouldExecuteTask
111111 tasks = Collections .singletonList (task );
112112
113113 // Act
114- parallelExecutor .prepare (tasks , TX_ID );
114+ parallelExecutor .prepareRecords (tasks , TX_ID );
115115
116116 // Assert
117117 verify (task , times (tasks .size ())).run ();
@@ -120,28 +120,28 @@ public void prepare_ParallelPreparationEnabled_SingleTaskGiven_ShouldExecuteTask
120120
121121 @ Test
122122 public void
123- prepare_ParallelPreparationEnabled_ExecutionExceptionThrownByTask_ShouldNotStopRunningTasks ()
123+ prepareRecords_ParallelPreparationEnabled_ExecutionExceptionThrownByTask_ShouldNotStopRunningTasks ()
124124 throws ExecutionException , ValidationConflictException , CrudException {
125125 // Arrange
126126 when (config .isParallelPreparationEnabled ()).thenReturn (true );
127127 doThrow (ExecutionException .class ).when (task ).run ();
128128
129129 // Act Assert
130- assertThatThrownBy (() -> parallelExecutor .prepare (tasks , TX_ID ))
130+ assertThatThrownBy (() -> parallelExecutor .prepareRecords (tasks , TX_ID ))
131131 .isInstanceOf (ExecutionException .class );
132132
133133 verify (task , times (tasks .size ())).run ();
134134 verify (parallelExecutorService , times (tasks .size ())).execute (any ());
135135 }
136136
137137 @ Test
138- public void validate_ParallelValidationNotEnabled_ShouldExecuteTasksSerially ()
138+ public void validateRecords_ParallelValidationNotEnabled_ShouldExecuteTasksSerially ()
139139 throws ExecutionException , ValidationConflictException , CrudException {
140140 // Arrange
141141 when (config .isParallelValidationEnabled ()).thenReturn (false );
142142
143143 // Act
144- parallelExecutor .validate (tasks , TX_ID );
144+ parallelExecutor .validateRecords (tasks , TX_ID );
145145
146146 // Assert
147147 verify (task , times (tasks .size ())).run ();
@@ -150,14 +150,14 @@ public void validate_ParallelValidationNotEnabled_ShouldExecuteTasksSerially()
150150
151151 @ Test
152152 public void
153- validate_ParallelValidationNotEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
153+ validateRecords_ParallelValidationNotEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
154154 throws ExecutionException , ValidationConflictException , CrudException {
155155 // Arrange
156156 when (config .isParallelValidationEnabled ()).thenReturn (false );
157157 doThrow (ExecutionException .class ).when (task ).run ();
158158
159159 // Act Assert
160- assertThatThrownBy (() -> parallelExecutor .validate (tasks , TX_ID ))
160+ assertThatThrownBy (() -> parallelExecutor .validateRecords (tasks , TX_ID ))
161161 .isInstanceOf (ExecutionException .class );
162162
163163 verify (task , only ()).run ();
@@ -166,36 +166,36 @@ public void validate_ParallelValidationNotEnabled_ShouldExecuteTasksSerially()
166166
167167 @ Test
168168 public void
169- validate_ParallelValidationNotEnabled_ValidationConflictExceptionThrownByTask_ShouldStopRunningTasks ()
169+ validateRecords_ParallelValidationNotEnabled_ValidationConflictExceptionThrownByTask_ShouldStopRunningTasks ()
170170 throws ExecutionException , ValidationConflictException , CrudException {
171171 // Arrange
172172 when (config .isParallelValidationEnabled ()).thenReturn (false );
173173 doThrow (ValidationConflictException .class ).when (task ).run ();
174174
175175 // Act Assert
176- assertThatThrownBy (() -> parallelExecutor .validate (tasks , TX_ID ))
176+ assertThatThrownBy (() -> parallelExecutor .validateRecords (tasks , TX_ID ))
177177 .isInstanceOf (ValidationConflictException .class );
178178
179179 verify (task , only ()).run ();
180180 verify (parallelExecutorService , never ()).execute (any ());
181181 }
182182
183183 @ Test
184- public void validate_ParallelValidationEnabled_ShouldExecuteTasksInParallel ()
184+ public void validateRecords_ParallelValidationEnabled_ShouldExecuteTasksInParallel ()
185185 throws ExecutionException , ValidationConflictException , CrudException {
186186 // Arrange
187187 when (config .isParallelValidationEnabled ()).thenReturn (true );
188188
189189 // Act
190- parallelExecutor .validate (tasks , TX_ID );
190+ parallelExecutor .validateRecords (tasks , TX_ID );
191191
192192 // Assert
193193 verify (task , times (tasks .size ())).run ();
194194 verify (parallelExecutorService , times (tasks .size ())).execute (any ());
195195 }
196196
197197 @ Test
198- public void validate_ParallelValidationEnabled_SingleTaskGiven_ShouldExecuteTasksSerially ()
198+ public void validateRecords_ParallelValidationEnabled_SingleTaskGiven_ShouldExecuteTasksSerially ()
199199 throws ExecutionException , ValidationConflictException , CrudException {
200200 // Arrange
201201 when (config .isParallelValidationEnabled ()).thenReturn (true );
@@ -204,7 +204,7 @@ public void validate_ParallelValidationEnabled_SingleTaskGiven_ShouldExecuteTask
204204 tasks = Collections .singletonList (task );
205205
206206 // Act
207- parallelExecutor .validate (tasks , TX_ID );
207+ parallelExecutor .validateRecords (tasks , TX_ID );
208208
209209 // Assert
210210 verify (task , times (tasks .size ())).run ();
@@ -213,14 +213,14 @@ public void validate_ParallelValidationEnabled_SingleTaskGiven_ShouldExecuteTask
213213
214214 @ Test
215215 public void
216- validate_ParallelValidationEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
216+ validateRecords_ParallelValidationEnabled_ExecutionExceptionThrownByTask_ShouldStopRunningTasks ()
217217 throws ExecutionException , ValidationConflictException , CrudException {
218218 // Arrange
219219 when (config .isParallelValidationEnabled ()).thenReturn (true );
220220 doThrow (ExecutionException .class ).when (task ).run ();
221221
222222 // Act Assert
223- assertThatThrownBy (() -> parallelExecutor .validate (tasks , TX_ID ))
223+ assertThatThrownBy (() -> parallelExecutor .validateRecords (tasks , TX_ID ))
224224 .isInstanceOf (ExecutionException .class );
225225
226226 verify (task , atMost (tasks .size ())).run ();
@@ -229,14 +229,14 @@ public void validate_ParallelValidationEnabled_SingleTaskGiven_ShouldExecuteTask
229229
230230 @ Test
231231 public void
232- validate_ParallelValidationEnabled_ValidationConflictExceptionThrownByTask_ShouldStopRunningTasks ()
232+ validateRecords_ParallelValidationEnabled_ValidationConflictExceptionThrownByTask_ShouldStopRunningTasks ()
233233 throws ExecutionException , ValidationConflictException , CrudException {
234234 // Arrange
235235 when (config .isParallelValidationEnabled ()).thenReturn (true );
236236 doThrow (ValidationConflictException .class ).when (task ).run ();
237237
238238 // Act Assert
239- assertThatThrownBy (() -> parallelExecutor .validate (tasks , TX_ID ))
239+ assertThatThrownBy (() -> parallelExecutor .validateRecords (tasks , TX_ID ))
240240 .isInstanceOf (ValidationConflictException .class );
241241
242242 verify (task , atMost (tasks .size ())).run ();
0 commit comments