Added tests for gen_ipv4() and gen_ipv6() methods