Can we make this a util method in oae-tenants/lib/test/util ?