public void testRemoveFromNewObject() {
    BinaryObjectBuilder builder = builder(GridBinaryTestClasses.TestObjectAllTypes.class.getName());

    builder.setField("str", "a");

    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);
  }