Fixing junit tests for external user management APIs