diff --git a/execution/src/main/resources/org/springframework/batch/execution/repository/dao/JobExecution.hbm.xml b/execution/src/main/resources/org/springframework/batch/execution/repository/dao/JobExecution.hbm.xml
index 823de3ce1..71928d035 100644
--- a/execution/src/main/resources/org/springframework/batch/execution/repository/dao/JobExecution.hbm.xml
+++ b/execution/src/main/resources/org/springframework/batch/execution/repository/dao/JobExecution.hbm.xml
@@ -12,7 +12,7 @@
&job-execution-generator;
-
+
diff --git a/execution/src/test/java/org/springframework/batch/execution/repository/SimpleJobRepositoryTests.java b/execution/src/test/java/org/springframework/batch/execution/repository/SimpleJobRepositoryTests.java
index 2fa825797..3491a6c23 100644
--- a/execution/src/test/java/org/springframework/batch/execution/repository/SimpleJobRepositoryTests.java
+++ b/execution/src/test/java/org/springframework/batch/execution/repository/SimpleJobRepositoryTests.java
@@ -261,7 +261,7 @@ public class SimpleJobRepositoryTests extends TestCase {
}
- public void testSaveOrUpdateJobExecution() {
+ public void testSaveOrUpdateInvalidJobExecution() {
// failure scenario - must have job ID
JobExecution jobExecution = new JobExecution(null);
@@ -272,9 +272,13 @@ public class SimpleJobRepositoryTests extends TestCase {
catch (Exception ex) {
// expected
}
+ }
+
+ public void testSaveOrUpdateValidJobExecution() throws Exception {
+
+ JobExecution jobExecution = new JobExecution(new Long(1));
// new execution - call save on job dao
- jobExecution.setJobId(new Long(1));
jobDao.save(jobExecution);
jobDaoControl.replay();
jobRepository.saveOrUpdate(jobExecution);