functional unit tests