Add unittest for generateUnittest