Integrate functional tests into unit tests (close gh-12).