Set a JUnit5 test as "errors"

I’m writing a JUnit5 test in androidTest, run the test with ./gradlew connectedDebugAndroidTest.

In my scenario, I need to set one of my test as “error”, but anyway I can only get “failure”:
time="0.0" skipped="0" errors="0" failures="3" tests="3".

How can I get one of the test as “error”, I’ve tried tons of ways, just not helpful.

Even the following test shows as “failure”:

void test03() {
   throw new ArithmeticException();

This is weird…
And I’m using

Any help is appreciated. Thanks in advance!