Add tests for engine