);
}}
});
refresh();
SQLResponse response = execute("select object_field, strict_field, no_dynamic_field from test12");
assertEquals(1, response.rowCount());
assertThat(response.rows()[0][0], instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> objectMap = (Map<String, Object>)response.rows()[0][0];
assertEquals(1384819200000L, objectMap.get("created"));
assertEquals(127, objectMap.get("size"));
assertThat(response.rows()[0][1], instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> strictMap = (Map<String, Object>)response.rows()[0][1];
assertEquals("/dev/null", strictMap.get("path"));
assertEquals(0, strictMap.get("created"));
assertThat(response.rows()[0][2], instanceOf(Map.class));
@SuppressWarnings("unchecked")
Map<String, Object> noDynamicMap = (Map<String, Object>)response.rows()[0][2];
assertEquals("/etc/shadow", noDynamicMap.get("path"));
assertEquals(
new HashMap<String, Object>(){{ put("field", 1384790145289L); }},
noDynamicMap.get("dynamic_again")
);
response = execute("select object_field['created'], object_field['size'], " +
"no_dynamic_field['dynamic_again']['field'] from test12");
assertEquals(1384819200000L, response.rows()[0][0]);
assertEquals(127, response.rows()[0][1]);
assertEquals(1384790145289L, response.rows()[0][2]);
}