@@ -403,6 +403,7 @@ public void testActionWithoutExecuteResult_clearTagStateSet() throws Exception {
403
403
404
404
public void testExecuteButResetReturnSameInvocation () throws Exception {
405
405
Mock mockActionInv = new Mock (ActionInvocation .class );
406
+ mockActionInv .matchAndReturn ("invoke" , "TEST" );
406
407
ActionTag tag = new ActionTag ();
407
408
tag .setPageContext (pageContext );
408
409
tag .setNamespace ("" );
@@ -419,7 +420,7 @@ public void testExecuteButResetReturnSameInvocation() throws Exception {
419
420
ActionComponent component = (ActionComponent ) tag .getComponent ();
420
421
421
422
tag .doEndTag ();
422
- assertSame (oldInvocation , ActionContext .getContext ().getActionInvocation ());
423
+ assertEquals (oldInvocation . invoke () , ActionContext .getContext ().getActionInvocation (). invoke ());
423
424
424
425
// Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
425
426
ActionTag freshTag = new ActionTag ();
@@ -432,6 +433,7 @@ public void testExecuteButResetReturnSameInvocation() throws Exception {
432
433
433
434
public void testExecuteButResetReturnSameInvocation_clearTagStateSet () throws Exception {
434
435
Mock mockActionInv = new Mock (ActionInvocation .class );
436
+ mockActionInv .matchAndReturn ("invoke" , "TEST" );
435
437
ActionTag tag = new ActionTag ();
436
438
tag .setPerformClearTagStateForTagPoolingServers (true ); // Explicitly request tag state clearing.
437
439
tag .setPageContext (pageContext );
@@ -450,7 +452,7 @@ public void testExecuteButResetReturnSameInvocation_clearTagStateSet() throws Ex
450
452
ActionComponent component = (ActionComponent ) tag .getComponent ();
451
453
452
454
tag .doEndTag ();
453
- assertTrue (oldInvocation == ActionContext .getContext ().getActionInvocation ());
455
+ assertEquals (oldInvocation . invoke (), ActionContext .getContext ().getActionInvocation (). invoke ());
454
456
455
457
// Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
456
458
ActionTag freshTag = new ActionTag ();
0 commit comments