code: public static void assertReturnValue(ReflectionMethod method, Class<?> expectedReturnType) {
          final Class<?> returnType = method.getReturnType();
          if (returnType != expectedReturnType) {
              final String message = "Class='"+method.getDeclaringClass()+"', method='"+method.getName()+"': Must return a value of type '"+expectedReturnType+"'!";
              throw new IllegalArgumentException(message);
          }
      }
docs: Assert that the given method returns the expected return type.
  
  @param method Method to assert.
  @param expectedReturnType Expected return type of the method.
  @throws IllegalArgumentException If the method's return type doesn't match the expected type.