Minor refactoring in test class
This commit is contained in:
parent
bc229a692e
commit
02f140e1c5
|
@ -66,12 +66,6 @@ public class SpringBatchRetryIntegrationTest {
|
|||
MockitoAnnotations.initMocks(this);
|
||||
}
|
||||
|
||||
private JobParameters defaultJobParameters() {
|
||||
JobParametersBuilder paramsBuilder = new JobParametersBuilder();
|
||||
paramsBuilder.addString("jobID", String.valueOf(System.currentTimeMillis()));
|
||||
return paramsBuilder.toJobParameters();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenEndpointAlwaysFailing_thenJobFails() throws Exception {
|
||||
when(httpClient.execute(any())).thenThrow(new ConnectTimeoutException("Endpoint is down"));
|
||||
|
@ -105,4 +99,10 @@ public class SpringBatchRetryIntegrationTest {
|
|||
assertThat(actualJobExitStatus.getExitCode(), is("COMPLETED"));
|
||||
AssertFile.assertFileEquals(expectedResult, actualResult);
|
||||
}
|
||||
|
||||
private JobParameters defaultJobParameters() {
|
||||
JobParametersBuilder paramsBuilder = new JobParametersBuilder();
|
||||
paramsBuilder.addString("jobID", String.valueOf(System.currentTimeMillis()));
|
||||
return paramsBuilder.toJobParameters();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue