@Override
    public void toData(DataOutput out) throws IOException {
      String f = "foobar";
      DataSerializer.writeObjectAsByteArray(f, out);
    }
Tests data serializing a {@link Boolean} using {@link DataSerializer#writeObject}.
geode-core/src/test/java/org/apache/geode/internal/DataSerializableJUnitTest.java