Tests for the misc functions