HyenaAssert { public static void isTrue(boolean expression, String message) { HyenaAssert.isTrue(expression, HyenaConstants.RES_CODE_STATUS_ERROR, message); } private  HyenaAssert(); static void isTrue(boolean expression, String message); static void isTrue(boolean expression, int code, String message); static void isTrue(boolean expression, int code, String message, Level logLevel); static void isTrue(boolean expression, int code,
                                                        String message, Level logLevel,
                                                        Class<T> exceptionType); static void equals(String expect, String actual, String message); static void notBlank(String expression, String message); static void notBlank(String expression, int code, String message); static void notBlank(String expression, int code, String message, Level logLevel); static void notBlank(String expression, int code,
                                                          String message, Level logLevel,
                                                          Class<T> exceptionType); static void isNull(Object obj, String message); static void isNull(Object obj, int code, String message); static void isNull(Object obj, int code, String message, Level logLevel); static void isNull(Object obj, int code,
                                                        String message, Level logLevel,
                                                        Class<T> exceptionType); static void notNull(Object obj, String message); static void notNull(Object obj, int code, String message); static void notNull(Object obj, int code, String message, Level logLevel); static void notNull(Object obj, int code,
                                                         String message, Level logLevel,
                                                         Class<T> exceptionType); static void notEmpty(Collection<?> obj, String message);  }
@Test public void test_isTrue() { Assertions.assertThrows(HyenaStatusException.class, () -> { HyenaAssert.isTrue(1 == 2, "expect HyenaStatusException"); log.error("test case fail!!!"); Assertions.fail(); }); }
@Test public void test_isTrue_exception() { Assertions.assertThrows(HyenaStatusException.class, () -> { HyenaAssert.isTrue(1 == 2, HyenaConstants.RES_CODE_STATUS_ERROR, "expect HyenaStatusException", Level.INFO, HyenaStatusException.class); log.error("test case fail!!!"); Assertions.fail(); }); }