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 11/*
2- * Copyright 2013-2022 the original author or authors.
2+ * Copyright 2013-2025 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -65,4 +65,22 @@ void testCreateJobKeyOrdering() {
6565 assertEquals (key1 , key2 );
6666 }
6767
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+
6886}
You can’t perform that action at this time.
0 commit comments