public void testAllFieldsSerialization() {
    GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
    obj.setDefaultData();
    obj.enumArr = null;

    GridBinaryTestClasses.TestObjectAllTypes deserialized =
        builder(toBinary(obj)).build().deserialize();

    GridTestUtils.deepEquals(obj, deserialized);
  }
  public void testRemoveFromExistingObjectAfterGet() {
    GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
    obj.setDefaultData();
    obj.enumArr = null;

    BinaryObjectBuilderImpl builder = builder(toBinary(obj));

    builder.getField("i_");

    builder.removeField("str");

    TestCase.assertNull(
        builder.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
  }
  public void testRemoveFromExistingObject() {
    GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
    obj.setDefaultData();
    obj.enumArr = null;

    BinaryObjectBuilder builder = builder(toBinary(obj));

    builder.removeField("str");

    BinaryObject binary = builder.build();

    GridBinaryTestClasses.TestObjectAllTypes deserialzied = binary.deserialize();

    assertNull(deserialzied.str);
  }