Revert "Revert "Implementation work on QueryEntityDeserializer""

This reverts commit 7c5207edc0c83d1dc338dfd1f54454b36782b42d.

It turns out the travis build has being doing this for a while as as it isn't actually failing the tests and the code looks good I will revert the revert...

Change-Id: I8dcdd6756f644ce40038d7ec8c46fd949c00f107