junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/commons/ReflectionUtils.java
@SuppressWarnings("unchecked")
	public static <T> T invoke(Method method) {
		boolean forceAccess = false;

		try {
			if (!method.isAccessible()) {
				method.setAccessible(true);
				forceAccess = true;
			}

			return (T) method.invoke(null);
		}
		catch (InvocationTargetException | IllegalAccessException ex) {
			throw new ReflectionException(ex);
		}
		finally {
			if (forceAccess) {
				method.setAccessible(false);
			}
		}
	}
@SuppressWarnings("unchecked")
	public static <T> T invoke(Method method) {
		boolean forceAccess = false;

		try {
			if (!method.isAccessible()) {
				method.setAccessible(true);
				forceAccess = true;
			}

			return (T) method.invoke(null);
		}
		catch (InvocationTargetException | IllegalAccessException ex) {
			throw new ReflectionException(ex);
		}
		finally {
			if (forceAccess) {
				method.setAccessible(false);
			}
		}
	}
Invoke the static method without any arguments.

@param method The method to invoke.
@param <T> Return type.
@return The result of the method invocation.