KotlinUtil { static boolean isSuspendingAndReturnTypeUnit(Method method) { try { return isSuspendingFunction(method) && IS_RETURN_TYPE_UNIT != null && (boolean) IS_RETURN_TYPE_UNIT.invoke(null, method); } catch (Exception e) { return false; } } private  KotlinUtil();   }
@Test void isSuspendingAndReturnTypeUnit() throws NoSuchMethodException { final Method testMethod = DummyService.class.getDeclaredMethod("testMethod"); assertThat(KotlinUtil.isSuspendingAndReturnTypeUnit(testMethod)).isFalse(); }