add unittest for casyncengine