Changed resource.of() to just resource().