1. Add ensureRole() method to Ensures that a user is of the specified role & 2. Add java doc

Signed-off-by: Hui Zheng <fengyimzy@gmail.com>