JUnitToAssertJRules
SUGGESTION
Simplification
Suppression
Disable all rules by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$).*
as compiler argument.
Table of contents
- ThrowNewAssertionError
- FailWithMessage
- FailWithMessageAndThrowable
- FailWithThrowable
- AssertThatIsTrue
- AssertThatWithFailMessageStringIsTrue
- AssertThatWithFailMessageSupplierIsTrue
- AssertThatIsFalse
- AssertThatWithFailMessageStringIsFalse
- AssertThatWithFailMessageSupplierIsFalse
- AssertThatIsNull
- AssertThatWithFailMessageStringIsNull
- AssertThatWithFailMessageSupplierIsNull
- AssertThatIsNotNull
- AssertThatWithFailMessageStringIsNotNull
- AssertThatWithFailMessageSupplierIsNotNull
- AssertThatIsSameAs
- AssertThatWithFailMessageStringIsSameAs
- AssertThatWithFailMessageSupplierIsSameAs
- AssertThatIsNotSameAs
- AssertThatWithFailMessageStringIsNotSameAs
- AssertThatWithFailMessageSupplierIsNotSameAs
- AssertThatThrownByIsExactlyInstanceOf
- AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf
- AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf
- AssertThatThrownByIsInstanceOf
- AssertThatThrownByWithFailMessageStringIsInstanceOf
- AssertThatThrownByWithFailMessageSupplierIsInstanceOf
- AssertThatCodeDoesNotThrowAnyException
- AssertThatCodeWithFailMessageStringDoesNotThrowAnyException
- AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException
- AssertThatIsInstanceOf
- AssertThatWithFailMessageStringIsInstanceOf
- AssertThatWithFailMessageSupplierIsInstanceOf
ThrowNewAssertionError
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("ThrowNewAssertionError")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$ThrowNewAssertionError).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testThrowNewAssertionError() {
- Assertions.fail();
+ throw new AssertionError();
}
FailWithMessage
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FailWithMessage")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$FailWithMessage).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
Object testFailWithMessage() {
- return Assertions.fail("foo");
+ return fail("foo");
}
FailWithMessageAndThrowable
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FailWithMessageAndThrowable")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$FailWithMessageAndThrowable).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
Object testFailWithMessageAndThrowable() {
- return Assertions.fail("foo", new IllegalStateException());
+ return fail("foo", new IllegalStateException());
}
FailWithThrowable
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("FailWithThrowable")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$FailWithThrowable).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testFailWithThrowable() {
- Assertions.fail(new IllegalStateException());
+ throw new AssertionError(new IllegalStateException());
}
AssertThatIsTrue
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsTrue")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsTrue).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsTrue() {
- assertTrue(true);
+ assertThat(true).isTrue();
}
AssertThatWithFailMessageStringIsTrue
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsTrue")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsTrue).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsTrue() {
- assertTrue(true, "foo");
+ assertThat(true).withFailMessage("foo").isTrue();
}
AssertThatWithFailMessageSupplierIsTrue
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsTrue")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsTrue).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsTrue() {
- assertTrue(true, () -> "foo");
+ assertThat(true).withFailMessage(() -> "foo").isTrue();
}
AssertThatIsFalse
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsFalse")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsFalse).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsFalse() {
- assertFalse(true);
+ assertThat(true).isFalse();
}
AssertThatWithFailMessageStringIsFalse
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsFalse")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsFalse).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsFalse() {
- assertFalse(true, "foo");
+ assertThat(true).withFailMessage("foo").isFalse();
}
AssertThatWithFailMessageSupplierIsFalse
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsFalse")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsFalse).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsFalse() {
- assertFalse(true, () -> "foo");
+ assertThat(true).withFailMessage(() -> "foo").isFalse();
}
AssertThatIsNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsNull() {
- assertNull(new Object());
+ assertThat(new Object()).isNull();
}
AssertThatWithFailMessageStringIsNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsNull() {
- assertNull(new Object(), "foo");
+ assertThat(new Object()).withFailMessage("foo").isNull();
}
AssertThatWithFailMessageSupplierIsNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsNull() {
- assertNull(new Object(), () -> "foo");
+ assertThat(new Object()).withFailMessage(() -> "foo").isNull();
}
AssertThatIsNotNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsNotNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsNotNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsNotNull() {
- assertNotNull(new Object());
+ assertThat(new Object()).isNotNull();
}
AssertThatWithFailMessageStringIsNotNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsNotNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsNotNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsNotNull() {
- assertNotNull(new Object(), "foo");
+ assertThat(new Object()).withFailMessage("foo").isNotNull();
}
AssertThatWithFailMessageSupplierIsNotNull
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsNotNull")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsNotNull).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsNotNull() {
- assertNotNull(new Object(), () -> "foo");
+ assertThat(new Object()).withFailMessage(() -> "foo").isNotNull();
}
AssertThatIsSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsSameAs() {
- assertSame("foo", "bar");
+ assertThat("bar").isSameAs("foo");
}
AssertThatWithFailMessageStringIsSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsSameAs() {
- assertSame("foo", "bar", "baz");
+ assertThat("bar").withFailMessage("baz").isSameAs("foo");
}
AssertThatWithFailMessageSupplierIsSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsSameAs() {
- assertSame("foo", "bar", () -> "baz");
+ assertThat("bar").withFailMessage(() -> "baz").isSameAs("foo");
}
AssertThatIsNotSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsNotSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsNotSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsNotSameAs() {
- assertNotSame("foo", "bar");
+ assertThat("bar").isNotSameAs("foo");
}
AssertThatWithFailMessageStringIsNotSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsNotSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsNotSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsNotSameAs() {
- assertNotSame("foo", "bar", "baz");
+ assertThat("bar").withFailMessage("baz").isNotSameAs("foo");
}
AssertThatWithFailMessageSupplierIsNotSameAs
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsNotSameAs")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsNotSameAs).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsNotSameAs() {
- assertNotSame("foo", "bar", () -> "baz");
+ assertThat("bar").withFailMessage(() -> "baz").isNotSameAs("foo");
}
AssertThatThrownByIsExactlyInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByIsExactlyInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByIsExactlyInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByIsExactlyInstanceOf() {
- assertThrowsExactly(IllegalStateException.class, () -> {});
+ assertThatThrownBy(() -> {}).isExactlyInstanceOf(IllegalStateException.class);
}
AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByWithFailMessageStringIsExactlyInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByWithFailMessageStringIsExactlyInstanceOf() {
- assertThrowsExactly(IllegalStateException.class, () -> {}, "foo");
+ assertThatThrownBy(() -> {})
+ .withFailMessage("foo")
+ .isExactlyInstanceOf(IllegalStateException.class);
}
AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByWithFailMessageSupplierIsExactlyInstanceOf() {
- assertThrowsExactly(IllegalStateException.class, () -> {}, () -> "foo");
+ assertThatThrownBy(() -> {})
+ .withFailMessage(() -> "foo")
+ .isExactlyInstanceOf(IllegalStateException.class);
}
AssertThatThrownByIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByIsInstanceOf() {
- assertThrows(IllegalStateException.class, () -> {});
+ assertThatThrownBy(() -> {}).isInstanceOf(IllegalStateException.class);
}
AssertThatThrownByWithFailMessageStringIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByWithFailMessageStringIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByWithFailMessageStringIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByWithFailMessageStringIsInstanceOf() {
- assertThrows(IllegalStateException.class, () -> {}, "foo");
+ assertThatThrownBy(() -> {}).withFailMessage("foo").isInstanceOf(IllegalStateException.class);
}
AssertThatThrownByWithFailMessageSupplierIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatThrownByWithFailMessageSupplierIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatThrownByWithFailMessageSupplierIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatThrownByWithFailMessageSupplierIsInstanceOf() {
- assertThrows(IllegalStateException.class, () -> {}, () -> "foo");
+ assertThatThrownBy(() -> {})
+ .withFailMessage(() -> "foo")
+ .isInstanceOf(IllegalStateException.class);
}
AssertThatCodeDoesNotThrowAnyException
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatCodeDoesNotThrowAnyException")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatCodeDoesNotThrowAnyException).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatCodeDoesNotThrowAnyException() {
- assertDoesNotThrow(() -> {});
- assertDoesNotThrow(() -> toString());
+ assertThatCode(() -> {}).doesNotThrowAnyException();
+ assertThatCode(() -> toString()).doesNotThrowAnyException();
}
AssertThatCodeWithFailMessageStringDoesNotThrowAnyException
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatCodeWithFailMessageStringDoesNotThrowAnyException")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatCodeWithFailMessageStringDoesNotThrowAnyException).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatCodeWithFailMessageStringDoesNotThrowAnyException() {
- assertDoesNotThrow(() -> {}, "foo");
- assertDoesNotThrow(() -> toString(), "bar");
+ assertThatCode(() -> {}).withFailMessage("foo").doesNotThrowAnyException();
+ assertThatCode(() -> toString()).withFailMessage("bar").doesNotThrowAnyException();
}
AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatCodeWithFailMessageSupplierDoesNotThrowAnyException() {
- assertDoesNotThrow(() -> {}, () -> "foo");
- assertDoesNotThrow(() -> toString(), () -> "bar");
+ assertThatCode(() -> {}).withFailMessage(() -> "foo").doesNotThrowAnyException();
+ assertThatCode(() -> toString()).withFailMessage(() -> "bar").doesNotThrowAnyException();
}
AssertThatIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatIsInstanceOf() {
- assertInstanceOf(Object.class, new Object());
+ assertThat(new Object()).isInstanceOf(Object.class);
}
AssertThatWithFailMessageStringIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageStringIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageStringIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageStringIsInstanceOf() {
- assertInstanceOf(Object.class, new Object(), "foo");
+ assertThat(new Object()).withFailMessage("foo").isInstanceOf(Object.class);
}
AssertThatWithFailMessageSupplierIsInstanceOf
SUGGESTION
Simplification
Suppression
Suppress false positives by adding the suppression annotation
@SuppressWarnings("AssertThatWithFailMessageSupplierIsInstanceOf")
to the enclosing element.Disable this rule by adding
-XepOpt:Refaster:NamePattern=^(?!JUnitToAssertJRules\$AssertThatWithFailMessageSupplierIsInstanceOf).*
as compiler argument.
Samples
Shows the difference in example code before and after the Refaster rule is applied.
void testAssertThatWithFailMessageSupplierIsInstanceOf() {
- assertInstanceOf(Object.class, new Object(), () -> "foo");
+ assertThat(new Object()).withFailMessage(() -> "foo").isInstanceOf(Object.class);
}