ThingWorx Edge Java SDK > Application Details > Infotables > Persisting Nested InfoTable Configurations
Persisting Nested InfoTable Configurations
The ThingWorx Edge Java SDK supports configuration files that contain nested InfoTables. The SDK can also consume a configuration that contains nested InfoTables. Here is an excerpt from a test case:
public void testtest() throws Throwable {
ConfigurationTestTemplate instance =
new ConfigurationTestTemplate(CONFIG_THING_NAME, null);
ConfigurationTestShape shape =
(ConfigurationTestShape) instance.getShapeInstances().

InfoTable nested = new InfoTable();
nested.addField(new FieldDefinition("ae", "", BaseTypes.STRING));
nested.addField(new FieldDefinition("bee", "", BaseTypes.NUMBER));

ValueCollection row = new ValueCollection();
row.put("ae", new StringPrimitive("1"));
row.put("bee", new NumberPrimitive(500.005));

InfoTable config = shape.getConfiguration();
row = config.getFirstRow();
row.put("c", new InfoTablePrimitive(nested));


instance = new ConfigurationTestTemplate(ETS_NAME, null);
shape = (ConfigurationTestShape) instance.getShapeInstances().get(ETS_NAME);
config = shape.getConfiguration();
If you were to put a breakpoint on the saveLocalConfiguration() line and step through the code, you would see that the generated configuration file contains the nested InfoTable. In addition the configuration that the new instance loads contains the correct configuration with the nested InfoTable.
The initial configuration does not specify a default for the InfoTable field c. If a default value had been specified, the value collection would not have contained the InfoTable primitive.