@Override
      public void run() {
        final PartitionedRegion pr = (PartitionedRegion) getRootRegion(name);
        assertNotNull(pr);
        try {
          pr.put("key", new DataSerializable() {
            @Override
            public void toData(DataOutput out) throws IOException {
              throw new IOException("bad to data");
              // throw new ToDataException("bad to data");
            }

            @Override
            public void fromData(DataInput in) throws IOException, ClassNotFoundException {
              // nothing needed
            }
          });
          fail("expected ToDataException");
        } catch (ToDataException expected) {
          // we want this put to fail with an exception instead of hanging due to retries
        }
      }
Tests a toData that always throws an IOException. This test does a put with the bad to data from
an accessor to see if it will keep trying to resend the put to the data store
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRBadToDataDUnitTest.java