BATCH-2007: Refactored to use JobParametersConverter instead of new interface
This commit is contained in:
@@ -21,6 +21,7 @@ import javax.batch.runtime.BatchStatus;
|
||||
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -35,12 +36,12 @@ public class JobContext implements javax.batch.runtime.context.JobContext {
|
||||
|
||||
private JobExecution jobExecution;
|
||||
private Object transientUserData;
|
||||
private ParametersConverter jobParametersConverter;
|
||||
private JobParametersConverter jobParametersConverter;
|
||||
|
||||
/**
|
||||
* @param jobExecution for the related job
|
||||
*/
|
||||
public JobContext(JobExecution jobExecution, ParametersConverter jobParametersConverter) {
|
||||
public JobContext(JobExecution jobExecution, JobParametersConverter jobParametersConverter) {
|
||||
Assert.notNull(jobExecution, "A JobExecution is required");
|
||||
Assert.notNull(jobParametersConverter, "A ParametersConverter is required");
|
||||
|
||||
@@ -93,7 +94,7 @@ public class JobContext implements javax.batch.runtime.context.JobContext {
|
||||
*/
|
||||
@Override
|
||||
public Properties getProperties() {
|
||||
return jobParametersConverter.convert(this.jobExecution.getJobParameters());
|
||||
return jobParametersConverter.getProperties(this.jobExecution.getJobParameters());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
@@ -20,6 +20,7 @@ import java.util.Properties;
|
||||
|
||||
import javax.batch.runtime.BatchStatus;
|
||||
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -32,12 +33,12 @@ import org.springframework.util.Assert;
|
||||
public class JobExecution implements javax.batch.runtime.JobExecution {
|
||||
|
||||
private org.springframework.batch.core.JobExecution execution;
|
||||
private ParametersConverter parametersConverter;
|
||||
private JobParametersConverter parametersConverter;
|
||||
|
||||
/**
|
||||
* @param execution for all information to be delegated from
|
||||
*/
|
||||
public JobExecution(org.springframework.batch.core.JobExecution execution, ParametersConverter parametersConverter) {
|
||||
public JobExecution(org.springframework.batch.core.JobExecution execution, JobParametersConverter parametersConverter) {
|
||||
Assert.notNull(execution, "A JobExecution is required");
|
||||
this.execution = execution;
|
||||
|
||||
@@ -113,6 +114,6 @@ public class JobExecution implements javax.batch.runtime.JobExecution {
|
||||
*/
|
||||
@Override
|
||||
public Properties getJobParameters() {
|
||||
return parametersConverter.convert(this.execution.getJobParameters());
|
||||
return parametersConverter.getProperties(this.execution.getJobParameters());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import javax.sql.DataSource;
|
||||
import org.springframework.batch.core.JobParameter;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao;
|
||||
import org.springframework.batch.item.database.support.DataFieldMaxValueIncrementerFactory;
|
||||
@@ -44,7 +45,7 @@ import org.springframework.util.Assert;
|
||||
* @author Michael Minella
|
||||
* @since 3.0
|
||||
*/
|
||||
public class JsrJobParametersConverter implements ParametersConverter, InitializingBean {
|
||||
public class JsrJobParametersConverter implements JobParametersConverter, InitializingBean {
|
||||
|
||||
public static final String JOB_RUN_ID = "jsr_batch_run_id";
|
||||
public DataFieldMaxValueIncrementer incremeter;
|
||||
@@ -78,15 +79,15 @@ public class JsrJobParametersConverter implements ParametersConverter, Initializ
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.batch.core.jsr.ParametersConverter#convert(java.util.Properties)
|
||||
* @see org.springframework.batch.core.converter.JobParametersConverter#getJobParameters(java.util.Properties)
|
||||
*/
|
||||
@Override
|
||||
public JobParameters convert(Properties parameters) {
|
||||
public JobParameters getJobParameters(Properties properties) {
|
||||
JobParametersBuilder builder = new JobParametersBuilder();
|
||||
boolean runIdFound = false;
|
||||
|
||||
if(parameters != null) {
|
||||
for (Map.Entry<Object, Object> curParameter : parameters.entrySet()) {
|
||||
if(properties != null) {
|
||||
for (Map.Entry<Object, Object> curParameter : properties.entrySet()) {
|
||||
if(curParameter.getValue() != null) {
|
||||
if(curParameter.getKey().equals(JOB_RUN_ID)) {
|
||||
runIdFound = true;
|
||||
@@ -106,15 +107,15 @@ public class JsrJobParametersConverter implements ParametersConverter, Initializ
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.batch.core.jsr.ParametersConverter#convert(org.springframework.batch.core.JobParameters)
|
||||
* @see org.springframework.batch.core.converter.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters)
|
||||
*/
|
||||
@Override
|
||||
public Properties convert(JobParameters parameters) {
|
||||
public Properties getProperties(JobParameters params) {
|
||||
Properties properties = new Properties();
|
||||
boolean runIdFound = false;
|
||||
|
||||
if(parameters != null) {
|
||||
for(Map.Entry<String, JobParameter> curParameter: parameters.getParameters().entrySet()) {
|
||||
if(params != null) {
|
||||
for(Map.Entry<String, JobParameter> curParameter: params.getParameters().entrySet()) {
|
||||
if(curParameter.getKey().equals(JOB_RUN_ID)) {
|
||||
runIdFound = true;
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.springframework.batch.core.jsr;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
|
||||
/**
|
||||
* Strategy interface used to provide the functionality of converting a
|
||||
* {@link Properties} object as used by JSR-352 to provide job parameters
|
||||
* to a {@link JobParameters} object as used by Spring Batch. This interface
|
||||
* defines methods for conversion both ways.
|
||||
*
|
||||
* @author Michael Minella
|
||||
* @since 3.0
|
||||
*/
|
||||
public interface ParametersConverter {
|
||||
|
||||
/**
|
||||
* Convert a {@link Properties} object to a {@link JobParameters} object
|
||||
* for use internally.
|
||||
*
|
||||
* @param parameters a {@link} Properties object to be converted
|
||||
* @return {@link JobParameters} a collection of parameters
|
||||
*/
|
||||
JobParameters convert(Properties parameters);
|
||||
|
||||
/**
|
||||
* Convert a {@link JobParameters} object to a {@link Properties} object for
|
||||
* exposure via the JSR-352 API.
|
||||
*
|
||||
* @param parameters
|
||||
* @return a collection of parameters in the form of a {@link Properties}
|
||||
* object
|
||||
*/
|
||||
Properties convert(JobParameters parameters);
|
||||
}
|
||||
@@ -23,15 +23,16 @@ import javax.batch.runtime.Metric;
|
||||
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
public class StepContext implements javax.batch.runtime.context.StepContext {
|
||||
|
||||
private StepExecution stepExecution;
|
||||
private Object transientUserData;
|
||||
private ParametersConverter jobParametersConveter;
|
||||
private JobParametersConverter jobParametersConveter;
|
||||
|
||||
public StepContext(StepExecution stepExecution, ParametersConverter jobParametersConveter) {
|
||||
public StepContext(StepExecution stepExecution, JobParametersConverter jobParametersConveter) {
|
||||
Assert.notNull(stepExecution, "A StepExecution is required");
|
||||
Assert.notNull(jobParametersConveter, "A ParametersConverter is required");
|
||||
|
||||
@@ -61,7 +62,7 @@ public class StepContext implements javax.batch.runtime.context.StepContext {
|
||||
|
||||
@Override
|
||||
public Properties getProperties() {
|
||||
return jobParametersConveter.convert(this.stepExecution.getJobParameters());
|
||||
return jobParametersConveter.getProperties(this.stepExecution.getJobParameters());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,9 +42,9 @@ import org.springframework.batch.core.BatchStatus;
|
||||
import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.jsr.JobContext;
|
||||
import org.springframework.batch.core.jsr.ParametersConverter;
|
||||
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
import org.springframework.beans.factory.access.BeanFactoryLocator;
|
||||
@@ -122,7 +122,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
private JobExplorer jobExplorer;
|
||||
private JobRepository jobRepository;
|
||||
private TaskExecutor taskExecutor;
|
||||
private ParametersConverter jobParametersConverter;
|
||||
private JobParametersConverter jobParametersConverter;
|
||||
private static ApplicationContext baseContext;
|
||||
|
||||
/**
|
||||
@@ -152,7 +152,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
* @param jobRepository an instance of Spring Batch's {@link JobOperator}
|
||||
* @param jobOperator an instance of Spring Batch's {@link org.springframework.batch.core.launch.JobOperator}
|
||||
*/
|
||||
public JsrJobOperator(JobExplorer jobExplorer, JobRepository jobRepository, org.springframework.batch.core.launch.JobOperator jobOperator, ParametersConverter jobParametersConverter) {
|
||||
public JsrJobOperator(JobExplorer jobExplorer, JobRepository jobRepository, org.springframework.batch.core.launch.JobOperator jobOperator, JobParametersConverter jobParametersConverter) {
|
||||
Assert.notNull(jobExplorer, "A JobExplorer is required");
|
||||
Assert.notNull(jobRepository, "A JobRepository is required");
|
||||
Assert.notNull(jobOperator, "A JobOperator is required");
|
||||
@@ -190,7 +190,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
* @param converter A {@link Converter} implementation used to convert {@link Properties} to
|
||||
* {@link JobParameters}
|
||||
*/
|
||||
public void setJobParametersConverter(ParametersConverter converter) {
|
||||
public void setJobParametersConverter(JobParametersConverter converter) {
|
||||
Assert.notNull(converter, "A Converter is required");
|
||||
|
||||
this.jobParametersConverter = converter;
|
||||
@@ -314,7 +314,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
throw new NoSuchJobExecutionException("Unable to find the JobExecution for id " + executionId);
|
||||
}
|
||||
|
||||
return jobParametersConverter.convert(execution.getJobParameters());
|
||||
return jobParametersConverter.getProperties(execution.getJobParameters());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -419,7 +419,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
final org.springframework.batch.core.JobExecution jobExecution;
|
||||
|
||||
try {
|
||||
JobParameters jobParameters = jobParametersConverter.convert(params);
|
||||
JobParameters jobParameters = jobParametersConverter.getJobParameters(params);
|
||||
jobExecution = jobRepository.createJobExecution(previousJobExecution.getJobInstance(), jobParameters, previousJobExecution.getJobConfigurationName());
|
||||
} catch (Exception e) {
|
||||
throw new JobRestartException(e);
|
||||
@@ -496,7 +496,7 @@ public class JsrJobOperator implements JobOperator {
|
||||
final org.springframework.batch.core.JobExecution jobExecution;
|
||||
|
||||
try {
|
||||
JobParameters jobParameters = jobParametersConverter.convert(params);
|
||||
JobParameters jobParameters = jobParametersConverter.getJobParameters(params);
|
||||
org.springframework.batch.core.JobInstance jobInstance = jobRepository.createJobInstance(job.getName(), jobParameters);
|
||||
jobExecution = jobRepository.createJobExecution(jobInstance, jobParameters, jobConfigurationLocation);
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package org.springframework.batch.core.jsr;
|
||||
package org.springframework.batch.core.converter;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
@@ -7,16 +7,15 @@ import org.springframework.batch.core.JobParameter;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
|
||||
public class ParametersConverterSupport implements ParametersConverter {
|
||||
public class JobParametersConverterSupport implements JobParametersConverter {
|
||||
|
||||
@Override
|
||||
public JobParameters convert(Properties parameters) {
|
||||
public JobParameters getJobParameters(Properties properties) {
|
||||
JobParametersBuilder builder = new JobParametersBuilder();
|
||||
|
||||
if(parameters != null) {
|
||||
for (Map.Entry<Object, Object> curParameter : parameters.entrySet()) {
|
||||
if(properties != null) {
|
||||
for (Map.Entry<Object, Object> curParameter : properties.entrySet()) {
|
||||
if(curParameter.getValue() != null) {
|
||||
|
||||
builder.addString(curParameter.getKey().toString(), curParameter.getValue().toString(), false);
|
||||
}
|
||||
}
|
||||
@@ -25,12 +24,15 @@ public class ParametersConverterSupport implements ParametersConverter {
|
||||
return builder.toJobParameters();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.springframework.batch.core.converter.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters)
|
||||
*/
|
||||
@Override
|
||||
public Properties convert(JobParameters parameters) {
|
||||
public Properties getProperties(JobParameters params) {
|
||||
Properties properties = new Properties();
|
||||
|
||||
if(properties != null) {
|
||||
for(Map.Entry<String, JobParameter> curParameter: parameters.getParameters().entrySet()) {
|
||||
if(params != null) {
|
||||
for(Map.Entry<String, JobParameter> curParameter: params.getParameters().entrySet()) {
|
||||
properties.setProperty(curParameter.getKey(), curParameter.getValue().getValue().toString());
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@ import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobInstance;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
|
||||
public class JobContextTests {
|
||||
|
||||
@@ -25,7 +26,7 @@ public class JobContextTests {
|
||||
@Mock
|
||||
private JobInstance instance;
|
||||
@Mock
|
||||
private ParametersConverter converter;
|
||||
private JobParametersConverter converter;
|
||||
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
@@ -75,7 +76,7 @@ public class JobContextTests {
|
||||
results.put("key1", "value1");
|
||||
|
||||
when(execution.getJobParameters()).thenReturn(params);
|
||||
when(converter.convert(params)).thenReturn(results);
|
||||
when(converter.getProperties(params)).thenReturn(results);
|
||||
|
||||
Properties props = context.getProperties();
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.JobInstance;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.converter.JobParametersConverterSupport;
|
||||
|
||||
public class JobExecutionTests {
|
||||
|
||||
@@ -34,12 +35,12 @@ public class JobExecutionTests {
|
||||
execution.setStatus(BatchStatus.FAILED);
|
||||
execution.setVersion(21);
|
||||
|
||||
adapter = new JobExecution(execution, new ParametersConverterSupport());
|
||||
adapter = new JobExecution(execution, new JobParametersConverterSupport());
|
||||
}
|
||||
|
||||
@Test(expected=IllegalArgumentException.class)
|
||||
public void testCreateWithNull() {
|
||||
adapter = new JobExecution(null, new ParametersConverterSupport());
|
||||
adapter = new JobExecution(null, new JobParametersConverterSupport());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -38,7 +38,7 @@ public class JsrJobParametersConverterTests {
|
||||
|
||||
@Test
|
||||
public void testNullJobParameters() {
|
||||
Properties props = converter.convert((JobParameters) null);
|
||||
Properties props = converter.getProperties((JobParameters) null);
|
||||
assertNotNull(props);
|
||||
Set<Entry<Object, Object>> properties = props.entrySet();
|
||||
assertEquals(1, properties.size());
|
||||
@@ -48,7 +48,7 @@ public class JsrJobParametersConverterTests {
|
||||
@Test
|
||||
public void testStringJobParameters() {
|
||||
JobParameters parameters = new JobParametersBuilder().addString("key", "value", false).toJobParameters();
|
||||
Properties props = converter.convert(parameters);
|
||||
Properties props = converter.getProperties(parameters);
|
||||
assertNotNull(props);
|
||||
Set<Entry<Object, Object>> properties = props.entrySet();
|
||||
assertEquals(2, properties.size());
|
||||
@@ -59,7 +59,7 @@ public class JsrJobParametersConverterTests {
|
||||
@Test
|
||||
public void testNonStringJobParameters() {
|
||||
JobParameters parameters = new JobParametersBuilder().addLong("key", 5l, false).toJobParameters();
|
||||
Properties props = converter.convert(parameters);
|
||||
Properties props = converter.getProperties(parameters);
|
||||
assertNotNull(props);
|
||||
Set<Entry<Object, Object>> properties = props.entrySet();
|
||||
assertEquals(2, properties.size());
|
||||
@@ -70,7 +70,7 @@ public class JsrJobParametersConverterTests {
|
||||
@Test
|
||||
public void testJobParametersWithRunId() {
|
||||
JobParameters parameters = new JobParametersBuilder().addLong("key", 5l, false).addLong(JsrJobParametersConverter.JOB_RUN_ID, 2l).toJobParameters();
|
||||
Properties props = converter.convert(parameters);
|
||||
Properties props = converter.getProperties(parameters);
|
||||
assertNotNull(props);
|
||||
Set<Entry<Object, Object>> properties = props.entrySet();
|
||||
assertEquals(2, properties.size());
|
||||
@@ -80,7 +80,7 @@ public class JsrJobParametersConverterTests {
|
||||
|
||||
@Test
|
||||
public void testNullProperties() {
|
||||
JobParameters parameters = converter.convert((Properties)null);
|
||||
JobParameters parameters = converter.getJobParameters((Properties)null);
|
||||
assertNotNull(parameters);
|
||||
assertEquals(1, parameters.getParameters().size());
|
||||
assertTrue(parameters.getParameters().containsKey(JsrJobParametersConverter.JOB_RUN_ID));
|
||||
@@ -90,7 +90,7 @@ public class JsrJobParametersConverterTests {
|
||||
public void testProperties() {
|
||||
Properties properties = new Properties();
|
||||
properties.put("key", "value");
|
||||
JobParameters parameters = converter.convert(properties);
|
||||
JobParameters parameters = converter.getJobParameters(properties);
|
||||
assertEquals(2, parameters.getParameters().size());
|
||||
assertEquals("value", parameters.getString("key"));
|
||||
assertTrue(parameters.getParameters().containsKey(JsrJobParametersConverter.JOB_RUN_ID));
|
||||
@@ -101,7 +101,7 @@ public class JsrJobParametersConverterTests {
|
||||
Properties properties = new Properties();
|
||||
properties.put("key", "value");
|
||||
properties.put(JsrJobParametersConverter.JOB_RUN_ID, "3");
|
||||
JobParameters parameters = converter.convert(properties);
|
||||
JobParameters parameters = converter.getJobParameters(properties);
|
||||
assertEquals(2, parameters.getParameters().size());
|
||||
assertEquals("value", parameters.getString("key"));
|
||||
assertEquals(Long.valueOf(3l), parameters.getLong(JsrJobParametersConverter.JOB_RUN_ID));
|
||||
|
||||
@@ -14,6 +14,7 @@ import org.springframework.batch.core.ExitStatus;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.converter.JobParametersConverterSupport;
|
||||
|
||||
public class StepContextTests {
|
||||
|
||||
@@ -37,7 +38,7 @@ public class StepContextTests {
|
||||
stepExecution.setWriteCount(7);
|
||||
stepExecution.setWriteSkipCount(8);
|
||||
|
||||
stepContext = new StepContext(stepExecution, new ParametersConverterSupport());
|
||||
stepContext = new StepContext(stepExecution, new JobParametersConverterSupport());
|
||||
stepContext.setTransientUserData("This is my transient data");
|
||||
}
|
||||
|
||||
|
||||
@@ -29,10 +29,10 @@ import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobInstance;
|
||||
import org.springframework.batch.core.JobParametersBuilder;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.core.converter.JobParametersConverter;
|
||||
import org.springframework.batch.core.converter.JobParametersConverterSupport;
|
||||
import org.springframework.batch.core.explore.JobExplorer;
|
||||
import org.springframework.batch.core.explore.support.SimpleJobExplorer;
|
||||
import org.springframework.batch.core.jsr.ParametersConverter;
|
||||
import org.springframework.batch.core.jsr.ParametersConverterSupport;
|
||||
import org.springframework.batch.core.launch.support.SimpleJobOperator;
|
||||
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
|
||||
import org.springframework.batch.core.repository.JobRepository;
|
||||
@@ -47,12 +47,12 @@ public class JsrJobOperatorTests {
|
||||
private JobExplorer jobExplorer;
|
||||
@Mock
|
||||
private JobRepository jobRepository;
|
||||
private ParametersConverter parameterConverter;
|
||||
private JobParametersConverter parameterConverter;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
parameterConverter = new ParametersConverterSupport();
|
||||
parameterConverter = new JobParametersConverterSupport();
|
||||
jsrJobOperator = new JsrJobOperator(jobExplorer, jobRepository, jobOperator, parameterConverter);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user