Add unit tests to support custom methods and twig extension