diff --git a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateContextAssert.java b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateContextAssert.java index 08bc231a..f7946502 100644 --- a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateContextAssert.java +++ b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateContextAssert.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2019-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,9 @@ */ package org.springframework.statemachine.test.assertj; +import java.util.Objects; + import org.assertj.core.api.AbstractAssert; -import org.assertj.core.util.Objects; import org.springframework.statemachine.StateContext; import org.springframework.statemachine.StateContext.Stage; @@ -46,7 +47,7 @@ public class StateContextAssert extends AbstractAssert but was <%s>", stage, actual.getStage()); } return this; @@ -61,7 +62,7 @@ public class StateContextAssert extends AbstractAssert but was <%s>", event, actual.getEvent()); } return this; @@ -79,7 +80,7 @@ public class StateContextAssert extends AbstractAssert but was <%s>", id, actual.getSource().getId()); } return this; @@ -111,7 +112,7 @@ public class StateContextAssert extends AbstractAssert but was <%s>", id, actual.getTarget().getId()); } return this; diff --git a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineAssert.java b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineAssert.java index 547ebb09..59a0cb05 100644 --- a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineAssert.java +++ b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineAssert.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2019-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,9 @@ */ package org.springframework.statemachine.test.assertj; +import java.util.Objects; + import org.assertj.core.api.AbstractAssert; -import org.assertj.core.util.Objects; import org.springframework.statemachine.StateMachine; /** @@ -48,7 +49,7 @@ public class StateMachineAssert extends AbstractAssert but was <%s>", id, actual.getState().getId()); } return this; diff --git a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineEventResultAssert.java b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineEventResultAssert.java index 1a30262c..85f98e73 100644 --- a/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineEventResultAssert.java +++ b/spring-statemachine-test/src/main/java/org/springframework/statemachine/test/assertj/StateMachineEventResultAssert.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2019-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,9 @@ */ package org.springframework.statemachine.test.assertj; +import java.util.Objects; + import org.assertj.core.api.AbstractAssert; -import org.assertj.core.util.Objects; import org.springframework.statemachine.StateMachineEventResult; import org.springframework.statemachine.StateMachineEventResult.ResultType; @@ -48,7 +49,7 @@ public class StateMachineEventResultAssert */ public StateMachineEventResultAssert hasResultType(ResultType resultType) { isNotNull(); - if (!Objects.areEqual(actual.getResultType(), resultType)) { + if (!Objects.deepEquals(actual.getResultType(), resultType)) { failWithMessage("Expected result's type to be <%s> but was <%s>", resultType, actual.getResultType()); } return this;