diff --git a/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java b/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java index 0c46e3a..2493328 100644 --- a/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java +++ b/moshi/src/test/java/com/squareup/moshi/JsonQualifiersTest.java @@ -339,8 +339,8 @@ public final class JsonQualifiersTest { assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasMessage("No @FromJson adapter for class java.lang.String " + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); - assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); - assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " + assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class); + assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class " + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); } } @@ -368,8 +368,8 @@ public final class JsonQualifiersTest { assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); assertThat(expected.getCause()).hasMessage("No @ToJson adapter for class java.lang.String " + "annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); - assertThat(expected).hasCauseExactlyInstanceOf(IllegalArgumentException.class); - assertThat(expected.getCause()).hasMessage("No next JsonAdapter for class " + assertThat(expected.getCause()).hasCauseExactlyInstanceOf(IllegalArgumentException.class); + assertThat(expected.getCause().getCause()).hasMessage("No next JsonAdapter for class " + "java.lang.String annotated [@com.squareup.moshi.JsonQualifiersTest$FooPrefix()]"); } }