// And I add child devices as per the following:
// | parent | child |
// | 0 | 1 |
// | 2 | 3 |
ManagedObjectRepresentation agent = aSampleMo().withName("Agent").withType("com.cumulocity.me.rest.representation.devicecontrol.Agent").with(new Agent()).build();
ManagedObjectRepresentation device = aSampleMo().withName("Device").withType("com.type").build();
ManagedObjectRepresentation agent2 = aSampleMo().withName("Agent2").withType("com.cumulocity.me.rest.representation.devicecontrol.Agent").with(new Agent()).build();
ManagedObjectRepresentation device2 = aSampleMo().withName("Device2").withType("com.type").build();
inventoryApi = platform.getInventoryApi();
agent = inventoryApi.create(agent);