private static void invokeAssert(String method, List<Class<?>> junit4ArgTypes, List<Object> junit4ArgValues,
                                     List<Class<?>> junit5ArgTypes, List<Object> junit5ArgValues) {
        try {
            invokeAssert("org.junit.jupiter.api.Assertions", method, junit5ArgTypes, junit5ArgValues);
        } catch (ReflectiveOperationException e) {
            try {
                invokeAssert("org.junit.Assert", method, junit4ArgTypes, junit4ArgValues);
            } catch (ReflectiveOperationException ex) {
                throw new RuntimeException("Unable to find junit4 or junit5 on test classpath", ex);
            }
        }
    }
Hack to support both junit4 and junit5

@author bjorncs
testutil/src/main/java/com/yahoo/test/JunitCompat.java