}
@Test
public void createAndUpdateManagedObject() throws Exception {
// Given
ManagedObjectRepresentation rep = aSampleMo().build();
ManagedObjectRepresentation result = inventory.create(rep);
// When
Coordinate coordinate = new Coordinate(100.0, 10.0);
result.set(coordinate);
GId id = result.getId();
result.setId(null);
result.setLastUpdated(null);
ManagedObjectRepresentation updated = inventory.getManagedObject(id).update(result);
//Then
assertThat(updated.getId()).isNotNull();
assertThat(coordinate).isEqualTo(updated.get(Coordinate.class));
}