private long migrateProperties(long startOfPropertyChain, PropertyWriter propertyWriter)
     throws IOException {
   LegacyPropertyRecord propertyRecord =
       legacyStore.getPropertyStoreReader().readPropertyRecord(startOfPropertyChain);
   List<Pair<Integer, Object>> properties = new ArrayList<Pair<Integer, Object>>();
   while (propertyRecord.getNextProp() != Record.NO_NEXT_PROPERTY.intValue()) {
     properties.add(extractValue(propertyRecord));
     propertyRecord =
         legacyStore.getPropertyStoreReader().readPropertyRecord(propertyRecord.getNextProp());
   }
   properties.add(extractValue(propertyRecord));
   return propertyWriter.writeProperties(properties);
 }
 private Pair<Integer, Object> extractValue(LegacyPropertyRecord propertyRecord) {
   int keyIndexId = propertyRecord.getKeyIndexId();
   Object value =
       propertyRecord.getType().getValue(propertyRecord, legacyStore.getDynamicRecordFetcher());
   return Pair.of(keyIndexId, value);
 }