add tests and example for gmail