Fix for bug USERGRID-94, ICLA - Malaka Mahanama
Unit tests for USERGRID-94 fix, ICLA - Malaka Mahanama