generate_integer and more tests