Added a functional test