fix automatic generate for test