@Test
public void testUnregisteredQueryType()
{

  @SuppressWarnings("unchecked")
  MessageDeserializerFactory qdf = new MessageDeserializerFactory(SchemaQuery.class);
  String unsupportedQuery = "{\"id\":\"1\",\"type\":\"Invalid type\"}";
  boolean exception = false;
  Message data = null;
  try {
    data = qdf.deserialize(unsupportedQuery);
  } catch (IOException e) {
    exception = true;
  }
  Assert.assertTrue("Resulting query should be null.", exception);
}