@@ -277,8 +277,9 @@ public void createCategories_WithSomeValidCategories_ShouldCreateCategoriesAndTr
277277
278278 assertThat (errorCallBackExceptions ).hasSize (1 );
279279 assertThat (errorCallBackMessages ).hasSize (1 );
280- assertThat (errorCallBackMessages .get (0 )).contains ("Invalid key '1'. Keys may only contain "
281- + "alphanumeric characters, underscores and hyphens and must have a maximum length of 256 characters." );
280+ assertThat (errorCallBackMessages .get (0 )).contains ("Invalid key '1'. Keys may only contain alphanumeric"
281+ + " characters, underscores and hyphens and must have a minimum length of 2 characters and maximum length"
282+ + " of 256 characters." );
282283 assertThat (createdCategories ).hasSize (1 );
283284 }
284285
@@ -308,8 +309,9 @@ public void createCategories_WithNoneValidCategories_ShouldTriggerCallBack() {
308309 assertThat (errorCallBackExceptions ).hasSize (2 );
309310 assertThat (errorCallBackMessages ).hasSize (2 );
310311 // Since the order of creation is not ensured by allOf, so we assert in list of error messages (as string):
311- assertThat (errorCallBackMessages .toString ()).contains ("Invalid key '1'. Keys may only contain"
312- + " alphanumeric characters, underscores and hyphens and must have a maximum length of 256 characters." );
312+ assertThat (errorCallBackMessages .toString ()).contains ("Invalid key '1'. Keys may only contain alphanumeric"
313+ + " characters, underscores and hyphens and must have a minimum length of 2 characters and maximum length"
314+ + " of 256 characters." );
313315 assertThat (errorCallBackMessages .toString ()).contains (" A duplicate value '\" furniture\" ' exists for field "
314316 + "'slug.en'" );
315317 assertThat (createdCategories ).isEmpty ();
@@ -396,8 +398,9 @@ public void createCategory_WithInvalidCategory_ShouldNotCreateCategory() {
396398 assertThat (createdCategoryOptional ).isEmpty ();
397399 assertThat (errorCallBackExceptions ).hasSize (1 );
398400 assertThat (errorCallBackMessages ).hasSize (1 );
399- assertThat (errorCallBackMessages .get (0 )).contains ("Invalid key '1'. Keys may only contain "
400- + "alphanumeric characters, underscores and hyphens and must have a maximum length of 256 characters." );
401+ assertThat (errorCallBackMessages .get (0 )).contains ("Invalid key '1'. Keys may only contain alphanumeric"
402+ + " characters, underscores and hyphens and must have a minimum length of 2 characters and maximum length"
403+ + " of 256 characters." );
401404
402405 //assert CTP state
403406 final Optional <Category > categoryOptional = CTP_TARGET_CLIENT
0 commit comments