matchers to match some throwable properties.CatchThrowableHamcrestMatchers.assertThat(caughtThrowable(), hasMessage("Index: 9, Size: 9"));assertThat(caughtThrowable(), hasMessageThat(is("Index: 9, Size: 9")));
assertThat(caughtThrowable(), hasMessageThat(containsString("Index: 9"))); // using JUnitMatchers
assertThat(caughtThrowable(), hasMessageThat(containsPattern("Index: \\d+"))); // using Mockito's FindassertThat(caughtThrowable(), hasNoCause());caught throwable to null.Serializable.ThrowableHolder.caughtThrowable.per Thread.matcher that matches an throwable with a certain
message.matcher that matches an throwable that has no cause.Copyright © 2019. All rights reserved.