Fleshed out functional test