public Builder withUserProperties(UserProperties properties) {
userSession.properties = Maps.newHashMap();
if (properties != null) {
for (int i = 0; i < properties.getPropertiesCount(); i++) {
Property prop = properties.getProperties(i);
userSession.properties.put(prop.getKey(), prop.getValue());
}
}
return this;
}