[WIP] Add functional test