- Added unit tests for getRoles and fixed a bug it revealed