when(row.getColumnDefinitions()).thenReturn(columnDefs);
when(columnDefs.iterator()).thenReturn(Arrays.<Definition>asList().iterator());
when(entityMeta.forOperations().instanciate()).thenReturn(entity);
when(entityMeta.getIdMeta()).thenReturn(idMeta);
when(idMeta.forRowExtraction().extractCompoundPrimaryKeyFromRow(row, entityMeta, MANAGED)).thenReturn(embeddedKey);
ClusteredEntity actual = entityMapper.mapRowToEntityWithPrimaryKey(entityMeta, row, propertiesMap, MANAGED);
assertThat(actual).isSameAs(entity);
verify(idMeta.forValues()).setValueToField(entity, embeddedKey);