Added a functional test (not finished).