Fix call to unit.NewUnit in functional tests