@@ -135,7 +135,7 @@ public void getCombinedMetadataFromErrorTemplate_shouldReturnMetadataWhenNoVaria
135135 public void getCombinedMetadataFromErrorTemplate_shouldReturnEmptyMapWhenContextMetadataIsEmpty () {
136136 String template = "This template has {{var1}}." ;
137137 Map <String , Object > metadata = Map .of ();
138- when (callContextMock .getContextStringKeyParameters ()).thenReturn (Map .of ());
138+ when (callContextMock .getErrorContextParameters ()).thenReturn (Map .of ());
139139 Map <String , Object > result = ErrorMessageResolver .getCombinedMetadataFromErrorTemplate (template , metadata );
140140 Assert .assertTrue ("Result should be an empty map" , result .isEmpty ());
141141 }
@@ -144,7 +144,7 @@ public void getCombinedMetadataFromErrorTemplate_shouldReturnEmptyMapWhenContext
144144 public void getCombinedMetadataFromErrorTemplate_shouldCombineContextAndProvidedMetadata () {
145145 String template = "This template has {{var1}} and {{var2}}." ;
146146 Map <String , Object > metadata = Map .of ("key1" , "value1" );
147- when (callContextMock .getContextStringKeyParameters ()).thenReturn (Map .of ("var1" , "valueVar1" , "var2" , "valueVar2" ));
147+ when (callContextMock .getErrorContextParameters ()).thenReturn (Map .of ("var1" , "valueVar1" , "var2" , "valueVar2" ));
148148 Map <String , Object > result = ErrorMessageResolver .getCombinedMetadataFromErrorTemplate (template , metadata );
149149 Assert .assertEquals ("Result should contain combined metadata" , 3 , result .size ());
150150 Assert .assertEquals ("Result should contain context metadata for var1" , "valueVar1" , result .get ("var1" ));
@@ -156,7 +156,7 @@ public void getCombinedMetadataFromErrorTemplate_shouldCombineContextAndProvided
156156 public void getCombinedMetadataFromErrorTemplate_shouldIgnoreVariablesNotInContextMetadata () {
157157 String template = "This template has {{var1}} and {{var2}}." ;
158158 Map <String , Object > metadata = Map .of ("key1" , "value1" );
159- when (callContextMock .getContextStringKeyParameters ()).thenReturn (Map .of ("var1" , "valueVar1" ));
159+ when (callContextMock .getErrorContextParameters ()).thenReturn (Map .of ("var1" , "valueVar1" ));
160160 Map <String , Object > result = ErrorMessageResolver .getCombinedMetadataFromErrorTemplate (template , metadata );
161161 Assert .assertEquals ("Result should contain combined metadata" , 2 , result .size ());
162162 Assert .assertEquals ("Result should contain context metadata for var1" , "valueVar1" , result .get ("var1" ));
@@ -332,7 +332,7 @@ public void getMessage_shouldReturnExpandedMessageWhenTemplateExists() {
332332 String template = "Error occurred: {{field}}" ;
333333 Map <String , Object > metadata = Map .of ("field" , "value" );
334334 createTempFileWithTemplate (errorKey , template );
335- when (callContextMock .getContextStringKeyParameters ()).thenReturn (Map .of ());
335+ when (callContextMock .getErrorContextParameters ()).thenReturn (Map .of ());
336336 String result = ErrorMessageResolver .getMessage (errorKey , metadata );
337337 Assert .assertEquals ("Error occurred: value" , result );
338338 }
@@ -361,7 +361,7 @@ public void getMessage_shouldCombineContextAndProvidedMetadata() {
361361 String template = "Error in {{field1}} and {{field2}}." ;
362362 Map <String , Object > metadata = Map .of ("field1" , "value1" );
363363 createTempFileWithTemplate (errorKey , template );
364- when (callContextMock .getContextStringKeyParameters ()).thenReturn (Map .of ("field2" , "value2" ));
364+ when (callContextMock .getErrorContextParameters ()).thenReturn (Map .of ("field2" , "value2" ));
365365 String result = ErrorMessageResolver .getMessage (errorKey , metadata );
366366 Assert .assertEquals ("Error in value1 and value2." , result );
367367 }
0 commit comments