test generate case