code: public static <T> T getObjectInstanceFromGroovyResource(final Resource resource,
                                                              final Class<T> expectedType) {
          return getObjectInstanceFromGroovyResource(resource, ArrayUtils.EMPTY_CLASS_ARRAY, ArrayUtils.EMPTY_OBJECT_ARRAY, expectedType);
      }
docs: Gets object instance from groovy resource.
  
  @param <T>          the type parameter
  @param resource     the resource
  @param expectedType the expected type
  @return the object instance from groovy resource