94: Fix and new associated test cases for USERGRID-94. ICLA - Malaka Mahanama

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