public CacheSerializableRunnable getCacheSerializableRunnableForPRPuts(final String regionName,
      final Object[] portfolio, final int from, final int to) {
    SerializableRunnable puts = new CacheSerializableRunnable("Region Puts") {
      @Override
      public void run2() throws CacheException {
        Cache cache = CacheFactory.getAnyInstance();
        Region region = cache.getRegion(regionName);
        for (int j = from; j < to; j++) {
          region.put(j, portfolio[j]);
        }
        LogWriterUtils.getLogWriter()
            .info("getCacheSerializableRunnableForPRPuts: Inserted Portfolio data on Region "
                + regionName);
      }
    };
    return (CacheSerializableRunnable) puts;
  }
This function puts portfolio objects into the created Region (PR or Local) *

@return cacheSerializable object
geode-core/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryUsingFunctionContextDUnitTest.java