Added tests for coverage.

Covers basic operations of the middleware for parallel and serial functions.