added granting and generating token on tests