94

Fix and new associated test cases for https://issues.apache.org/jira/browse/USERGRID-94.