Test function added accompanying pull request #2520