// Given
ManagedObjectRepresentation parent = inventory.create(aSampleMo().withName("parent1").build());
ManagedObjectRepresentation child1 = inventory.create(aSampleMo().withName("child11").build());
ManagedObjectRepresentation child2 = inventory.create(aSampleMo().withName("child21").build());
ManagedObjectReferenceRepresentation childRef1 = anMoRefRepresentationLike(MO_REF_REPRESENTATION).withMo(child1).build();
ManagedObjectReferenceRepresentation childRef2 = anMoRefRepresentationLike(MO_REF_REPRESENTATION).withMo(child2).build();
// When
ManagedObject parentMo = inventory.getManagedObject(parent.getId());
parentMo.addChildDevice(childRef1);
parentMo.addChildDevice(childRef2);