examples written in groovy using rxjava