added new test & fixed generate with no predictate