unit test for Engine class