File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
spring-batch-core/src/test/java/org/springframework/batch/core Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2013-2022 the original author or authors.
2
+ * Copyright 2013-2025 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -65,4 +65,22 @@ void testCreateJobKeyOrdering() {
65
65
assertEquals (key1 , key2 );
66
66
}
67
67
68
+ @ Test
69
+ public void testCreateJobKeyForEmptyParameters () {
70
+ JobParameters jobParameters1 = new JobParameters ();
71
+ JobParameters jobParameters2 = new JobParameters ();
72
+ String key1 = jobKeyGenerator .generateKey (jobParameters1 );
73
+ String key2 = jobKeyGenerator .generateKey (jobParameters2 );
74
+ assertEquals (key1 , key2 );
75
+ }
76
+
77
+ @ Test
78
+ public void testCreateJobKeyForEmptyParametersAndNonIdentifying () {
79
+ JobParameters jobParameters1 = new JobParameters ();
80
+ JobParameters jobParameters2 = new JobParametersBuilder ().addString ("name" , "foo" , false ).toJobParameters ();
81
+ String key1 = jobKeyGenerator .generateKey (jobParameters1 );
82
+ String key2 = jobKeyGenerator .generateKey (jobParameters2 );
83
+ assertEquals (key1 , key2 );
84
+ }
85
+
68
86
}
You can’t perform that action at this time.
0 commit comments