@@ -180,8 +180,8 @@ public void activityFailureMetricBenignApplicationError() {
180180 "Inner cause should be ApplicationFailure" ,
181181 nonBenignErr .getCause ().getCause () instanceof ApplicationFailure );
182182 ApplicationFailure af = (ApplicationFailure ) nonBenignErr .getCause ().getCause ();
183- assertNotSame (
184- "Failure should not be benign" , af .getCategory (), ApplicationErrorCategory . BENIGN );
183+ assertNotEquals (
184+ "Failure should not be benign" , ApplicationErrorCategory . BENIGN , af .getCategory ());
185185 assertEquals ("Non-benign activity failure" , af .getOriginalMessage ());
186186
187187 reporter .assertCounter (
@@ -209,7 +209,7 @@ public void activityFailureMetricBenignApplicationError() {
209209 "Inner cause should be ApplicationFailure" ,
210210 benignErr .getCause ().getCause () instanceof ApplicationFailure );
211211 ApplicationFailure af2 = (ApplicationFailure ) benignErr .getCause ().getCause ();
212- assertSame ("Failure should be benign" , af2 .getCategory (), ApplicationErrorCategory . BENIGN );
212+ assertEquals ("Failure should be benign" , ApplicationErrorCategory . BENIGN , af2 .getCategory ());
213213 assertEquals ("Benign activity failure" , af2 .getOriginalMessage ());
214214
215215 // Expect metrics to remain unchanged for benign failure
@@ -250,8 +250,8 @@ public void localActivityFailureMetricBenignApplicationError() {
250250 "Inner cause should be ApplicationFailure" ,
251251 nonBenignErr .getCause ().getCause () instanceof ApplicationFailure );
252252 ApplicationFailure af = (ApplicationFailure ) nonBenignErr .getCause ().getCause ();
253- assertNotSame (
254- "Failure should not be benign" , af .getCategory (), ApplicationErrorCategory . BENIGN );
253+ assertNotEquals (
254+ "Failure should not be benign" , ApplicationErrorCategory . BENIGN , af .getCategory ());
255255 assertEquals ("Non-benign activity failure" , af .getOriginalMessage ());
256256
257257 // Expect metrics to be incremented for non-benign failure
@@ -279,7 +279,7 @@ public void localActivityFailureMetricBenignApplicationError() {
279279 "Inner cause should be ApplicationFailure" ,
280280 benignErr .getCause ().getCause () instanceof ApplicationFailure );
281281 ApplicationFailure af2 = (ApplicationFailure ) benignErr .getCause ().getCause ();
282- assertSame ("Failure should be benign" , af2 .getCategory (), ApplicationErrorCategory . BENIGN );
282+ assertEquals ("Failure should be benign" , ApplicationErrorCategory . BENIGN , af2 .getCategory ());
283283 assertEquals ("Benign activity failure" , af2 .getOriginalMessage ());
284284
285285 // Expect metrics to remain unchanged for benign failure
0 commit comments