@Test
public void testStoreObjectSetsId() {

  ObjectRecord record = new ObjectRecord();
  ObjectEntity entity = new ObjectEntity();
  when(objectRecordConverter.toEntity(record)).thenReturn(entity);
  assertSame(record, dao.storeObject(record));
  verify(objectRecordConverter).toEntity(argThat(r -> r.getId() != null));
  verify(objectManager).saveObject(entity);
}