ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [18/29] ignite git commit: ignite-2065: rename "portable" classes to "binary" (in tests)
Date Mon, 14 Dec 2015 06:00:37 GMT
ignite-2065: rename "portable" classes to "binary" (in tests)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/469bf6d6
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/469bf6d6
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/469bf6d6

Branch: refs/heads/ignite-1537
Commit: 469bf6d62f4ce6088ca99a2cb6823523958c3470
Parents: 71ad9ce
Author: ashutak <ashutak@gridgain.com>
Authored: Fri Dec 11 18:08:18 2015 +0300
Committer: ashutak <ashutak@gridgain.com>
Committed: Fri Dec 11 18:08:18 2015 +0300

----------------------------------------------------------------------
 .../BinaryObjectBuilderAdditionalSelfTest.java  | 258 +++++-----
 .../binary/BinaryObjectBuilderSelfTest.java     |  46 +-
 .../binary/GridBinaryMetaDataSelfTest.java      | 371 ++++++++++++++
 .../binary/GridBinaryWildcardsSelfTest.java     | 464 ++++++++++++++++++
 .../binary/GridPortableMetaDataSelfTest.java    | 371 --------------
 .../binary/GridPortableWildcardsSelfTest.java   | 464 ------------------
 .../mutabletest/GridBinaryTestClasses.java      | 484 +++++++++++++++++++
 .../mutabletest/GridPortableTestClasses.java    | 484 -------------------
 .../binary/test/GridBinaryTestClass1.java       |  28 ++
 .../binary/test/GridBinaryTestClass2.java       |  24 +
 .../binary/test/GridPortableTestClass1.java     |  28 --
 .../binary/test/GridPortableTestClass2.java     |  24 -
 .../test/subpackage/GridBinaryTestClass3.java   |  24 +
 .../test/subpackage/GridPortableTestClass3.java |  24 -
 .../GridCacheBinaryStoreBinariesSelfTest.java   |  66 +++
 .../GridCacheBinaryStorePortablesSelfTest.java  |  66 ---
 ...sNearPartitionedByteArrayValuesSelfTest.java |  41 ++
 ...sNearPartitionedByteArrayValuesSelfTest.java |  41 --
 .../IgniteBinaryCacheFullApiTestSuite.java      |  37 ++
 .../testsuites/IgniteBinaryCacheTestSuite.java  | 101 ++++
 .../IgniteBinaryObjectsTestSuite.java           | 114 +++++
 .../IgnitePortableCacheFullApiTestSuite.java    |  37 --
 .../IgnitePortableCacheTestSuite.java           | 101 ----
 .../IgnitePortableObjectsTestSuite.java         | 114 -----
 .../IgniteBinaryCacheQueryTestSuite.java        | 119 +++++
 .../IgnitePortableCacheQueryTestSuite.java      | 119 -----
 26 files changed, 2025 insertions(+), 2025 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java
index bf329a5..a1f980c 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderAdditionalSelfTest.java
@@ -30,7 +30,7 @@ import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.configuration.BinaryConfiguration;
 import org.apache.ignite.configuration.CacheConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.mutabletest.GridPortableTestClasses;
+import org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses;
 import org.apache.ignite.internal.binary.builder.BinaryObjectBuilderImpl;
 import org.apache.ignite.internal.binary.builder.BinaryBuilderEnum;
 import org.apache.ignite.internal.binary.mutabletest.GridBinaryMarshalerAwareTestClass;
@@ -116,13 +116,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      * @throws Exception If failed.
      */
     public void testSimpleTypeFieldRead() throws Exception {
-        GridPortableTestClasses.TestObjectAllTypes exp = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes();
 
         exp.setDefaultData();
 
         BinaryObjectBuilder mutPo = wrap(exp);
 
-        for (Field field : GridPortableTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
+        for (Field field : GridBinaryTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
             Object expVal = field.get(exp);
             Object actVal = mutPo.getField(field.getName());
 
@@ -150,13 +150,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testSimpleTypeFieldSerialize() {
-        GridPortableTestClasses.TestObjectAllTypes exp = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes();
 
         exp.setDefaultData();
 
         BinaryObjectBuilderImpl mutPo = wrap(exp);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
 
         GridTestUtils.deepEquals(exp, res);
     }
@@ -165,16 +165,16 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      * @throws Exception If any error occurs.
      */
     public void testSimpleTypeFieldOverride() throws Exception {
-        GridPortableTestClasses.TestObjectAllTypes exp = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes();
 
         exp.setDefaultData();
 
-        BinaryObjectBuilderImpl mutPo = wrap(new GridPortableTestClasses.TestObjectAllTypes());
+        BinaryObjectBuilderImpl mutPo = wrap(new GridBinaryTestClasses.TestObjectAllTypes());
 
-        for (Field field : GridPortableTestClasses.TestObjectAllTypes.class.getDeclaredFields())
+        for (Field field : GridBinaryTestClasses.TestObjectAllTypes.class.getDeclaredFields())
             mutPo.setField(field.getName(), field.get(exp));
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
 
         GridTestUtils.deepEquals(exp, res);
     }
@@ -183,20 +183,20 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      * @throws Exception If any error occurs.
      */
     public void testSimpleTypeFieldSetNull() throws Exception {
-        GridPortableTestClasses.TestObjectAllTypes exp = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes exp = new GridBinaryTestClasses.TestObjectAllTypes();
 
         exp.setDefaultData();
 
         BinaryObjectBuilderImpl mutPo = wrap(exp);
 
-        for (Field field : GridPortableTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
+        for (Field field : GridBinaryTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
             if (!field.getType().isPrimitive())
                 mutPo.setField(field.getName(), null);
         }
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutPo.build().deserialize();
 
-        for (Field field : GridPortableTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
+        for (Field field : GridBinaryTestClasses.TestObjectAllTypes.class.getDeclaredFields()) {
             if (!field.getType().isPrimitive())
                 assertNull(field.getName(), field.get(res));
         }
@@ -206,8 +206,8 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      * @throws IgniteCheckedException If any error occurs.
      */
     public void testMakeCyclicDependency() throws IgniteCheckedException {
-        GridPortableTestClasses.TestObjectOuter outer = new GridPortableTestClasses.TestObjectOuter();
-        outer.inner = new GridPortableTestClasses.TestObjectInner();
+        GridBinaryTestClasses.TestObjectOuter outer = new GridBinaryTestClasses.TestObjectOuter();
+        outer.inner = new GridBinaryTestClasses.TestObjectInner();
 
         BinaryObjectBuilderImpl mutOuter = wrap(outer);
 
@@ -216,7 +216,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         mutInner.setField("outer", mutOuter);
         mutInner.setField("foo", mutInner);
 
-        GridPortableTestClasses.TestObjectOuter res = mutOuter.build().deserialize();
+        GridBinaryTestClasses.TestObjectOuter res = mutOuter.build().deserialize();
 
         assertEquals(res, res.inner.outer);
         assertEquals(res.inner, res.inner.foo);
@@ -226,7 +226,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDateArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.dateArr =  new Date[] {new Date(11111), new Date(11111), new Date(11111)};
 
@@ -235,7 +235,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         Date[] arr = mutObj.getField("dateArr");
         arr[0] = new Date(22222);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new Date[] {new Date(22222), new Date(11111), new Date(11111)}, res.dateArr);
     }
@@ -244,7 +244,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testTimestampArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.tsArr = new Timestamp[] {new Timestamp(111222333), new Timestamp(222333444)};
 
@@ -253,7 +253,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         Timestamp[] arr = mutObj.getField("tsArr");
         arr[0] = new Timestamp(333444555);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new Timestamp[] {new Timestamp(333444555), new Timestamp(222333444)}, res.tsArr);
     }
@@ -262,7 +262,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testUUIDArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.uuidArr = new UUID[] {new UUID(1, 1), new UUID(1, 1), new UUID(1, 1)};
 
@@ -271,7 +271,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         UUID[] arr = mutObj.getField("uuidArr");
         arr[0] = new UUID(2, 2);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new UUID[] {new UUID(2, 2), new UUID(1, 1), new UUID(1, 1)}, res.uuidArr);
     }
@@ -280,7 +280,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDecimalArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.bdArr = new BigDecimal[] {new BigDecimal(1000), new BigDecimal(1000), new BigDecimal(1000)};
 
@@ -289,7 +289,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         BigDecimal[] arr = mutObj.getField("bdArr");
         arr[0] = new BigDecimal(2000);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new BigDecimal[] {new BigDecimal(1000), new BigDecimal(1000), new BigDecimal(1000)},
             res.bdArr);
@@ -299,7 +299,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testBooleanArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.zArr = new boolean[] {false, false, false};
 
@@ -308,7 +308,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         boolean[] arr = mutObj.getField("zArr");
         arr[0] = true;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         boolean[] expected = new boolean[] {true, false, false};
 
@@ -322,7 +322,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testCharArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.cArr = new char[] {'a', 'a', 'a'};
 
@@ -331,7 +331,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         char[] arr = mutObj.getField("cArr");
         arr[0] = 'b';
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new char[] {'b', 'a', 'a'}, res.cArr);
     }
@@ -340,7 +340,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDoubleArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.dArr = new double[] {1.0, 1.0, 1.0};
 
@@ -349,7 +349,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         double[] arr = mutObj.getField("dArr");
         arr[0] = 2.0;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new double[] {2.0, 1.0, 1.0}, res.dArr, 0);
     }
@@ -358,7 +358,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testFloatArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.fArr = new float[] {1.0f, 1.0f, 1.0f};
 
@@ -369,7 +369,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         BinaryObject resBinary = mutObj.build();
 
-        GridPortableTestClasses.TestObjectAllTypes res = resBinary.deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = resBinary.deserialize();
 
         Assert.assertArrayEquals(new float[] {2.0f, 1.0f, 1.0f}, res.fArr, 0);
     }
@@ -378,7 +378,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testLongArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.lArr = new long[] {1, 1, 1};
 
@@ -387,7 +387,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         long[] arr = mutObj.getField("lArr");
         arr[0] = 2;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new long[] {2, 1, 1}, res.lArr);
     }
@@ -396,7 +396,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testIntArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.iArr = new int[] {1, 1, 1};
 
@@ -405,7 +405,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         int[] arr = mutObj.getField("iArr");
         arr[0] = 2;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new int[] {2, 1, 1}, res.iArr);
     }
@@ -414,7 +414,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testShortArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.sArr = new short[] {1, 1, 1};
 
@@ -423,7 +423,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         short[] arr = mutObj.getField("sArr");
         arr[0] = 2;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new short[] {2, 1, 1}, res.sArr);
     }
@@ -432,7 +432,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testByteArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.bArr = new byte[] {1, 1, 1};
 
@@ -441,7 +441,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         byte[] arr = mutObj.getField("bArr");
         arr[0] = 2;
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new byte[] {2, 1, 1}, res.bArr);
     }
@@ -450,7 +450,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testStringArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
         obj.strArr = new String[] {"a", "a", "a"};
 
@@ -459,7 +459,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         String[] arr = mutObj.getField("strArr");
         arr[0] = "b";
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new String[] {"b", "a", "a"}, res.strArr);
     }
@@ -468,7 +468,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testModifyObjectArray() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = new Object[] {"a"};
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -479,7 +479,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         arr[0] = "b";
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         Assert.assertArrayEquals(new Object[] {"b"}, (Object[])res.foo);
     }
@@ -488,13 +488,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testOverrideObjectArrayField() {
-        BinaryObjectBuilderImpl mutObj = wrap(new GridPortableTestClasses.TestObjectContainer());
+        BinaryObjectBuilderImpl mutObj = wrap(new GridBinaryTestClasses.TestObjectContainer());
 
         Object[] createdArr = {mutObj, "a", 1, new String[] {"s", "s"}, new byte[] {1, 2}, new UUID(3, 0)};
 
         mutObj.setField("foo", createdArr.clone());
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         createdArr[0] = res;
 
@@ -505,7 +505,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDeepArray() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = new Object[] {new Object[] {"a", obj}};
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -517,7 +517,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         arr[0] = mutObj;
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         arr = (Object[])((Object[])res.foo)[0];
 
@@ -529,7 +529,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testArrayListRead() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Lists.newArrayList(obj, "a");
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -543,7 +543,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testArrayListOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
@@ -551,7 +551,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutObj.setField("foo", list);
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         list.set(0, res);
 
@@ -563,7 +563,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testArrayListModification() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Lists.newArrayList("a", "b", "c");
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -580,7 +580,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         assertEquals(1, list.indexOf("b"));
         assertEquals(1, list.lastIndexOf("b"));
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         assertTrue(res.foo instanceof ArrayList);
         assertEquals(Arrays.asList("_", "b", "c", "!"), res.foo);
@@ -590,7 +590,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testArrayListClear() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Lists.newArrayList("a", "b", "c");
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -599,14 +599,14 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         list.clear();
 
-        TestCase.assertEquals(Collections.emptyList(), mutObj.build().<GridPortableTestClasses.TestObjectContainer>deserialize().foo);
+        TestCase.assertEquals(Collections.emptyList(), mutObj.build().<GridBinaryTestClasses.TestObjectContainer>deserialize().foo);
     }
 
     /**
      *
      */
     public void testArrayListWriteUnmodifiable() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         ArrayList<Object> src = Lists.newArrayList(obj, "a", "b", "c");
 
@@ -614,7 +614,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
-        GridPortableTestClasses.TestObjectContainer deserialized = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = mutObj.build().deserialize();
 
         List<Object> res = (List<Object>)deserialized.foo;
 
@@ -627,7 +627,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testLinkedListRead() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Lists.newLinkedList(Arrays.asList(obj, "a"));
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -641,7 +641,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testLinkedListOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
@@ -649,7 +649,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutObj.setField("foo", list);
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         list.set(0, res);
 
@@ -661,7 +661,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testLinkedListModification() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         obj.foo = Lists.newLinkedList(Arrays.asList("a", "b", "c"));
 
@@ -679,7 +679,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         assertEquals(1, list.indexOf("b"));
         assertEquals(1, list.lastIndexOf("b"));
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         assertTrue(res.foo instanceof LinkedList);
         assertEquals(Arrays.asList("_", "b", "c", "!"), res.foo);
@@ -689,7 +689,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testLinkedListWriteUnmodifiable() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         LinkedList<Object> src = Lists.newLinkedList(Arrays.asList(obj, "a", "b", "c"));
 
@@ -697,7 +697,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
-        GridPortableTestClasses.TestObjectContainer deserialized = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = mutObj.build().deserialize();
 
         List<Object> res = (List<Object>)deserialized.foo;
 
@@ -710,7 +710,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testHashSetRead() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Sets.newHashSet(obj, "a");
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -724,7 +724,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testHashSetOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
@@ -732,7 +732,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutObj.setField("foo", c);
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         c.remove(mutObj);
         c.add(res);
@@ -745,7 +745,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testHashSetModification() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Sets.newHashSet("a", "b", "c");
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -759,7 +759,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         assertTrue(set.contains("a"));
         assertTrue(set.contains("!"));
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         assertTrue(res.foo instanceof HashSet);
         assertEquals(Sets.newHashSet("a", "!", "c"), res.foo);
@@ -769,13 +769,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testHashSetWriteUnmodifiable() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         Set<Object> src = Sets.newHashSet(obj, "a", "b", "c");
 
         obj.foo = src;
 
-        GridPortableTestClasses.TestObjectContainer deserialized = wrap(obj).build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = wrap(obj).build().deserialize();
 
         Set<Object> res = (Set<Object>)deserialized.foo;
 
@@ -789,7 +789,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMapRead() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Maps.newHashMap(ImmutableMap.of(obj, "a", "b", obj));
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -803,7 +803,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMapOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
@@ -811,7 +811,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutObj.setField("foo", map);
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         assertEquals(ImmutableMap.of(res, "a", "b", res), res.foo);
     }
@@ -820,7 +820,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMapModification() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Maps.newHashMap(ImmutableMap.of(1, "a", 2, "b"));
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
@@ -832,7 +832,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         assertEquals("a", rmv);
 
-        GridPortableTestClasses.TestObjectContainer res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutObj.build().deserialize();
 
         assertEquals(ImmutableMap.of(2, "b", 3, res), res.foo);
     }
@@ -841,18 +841,18 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testEnumArrayModification() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
 
-        obj.enumArr = new GridPortableTestClasses.TestObjectEnum[] {GridPortableTestClasses.TestObjectEnum.A, GridPortableTestClasses.TestObjectEnum.B};
+        obj.enumArr = new GridBinaryTestClasses.TestObjectEnum[] {GridBinaryTestClasses.TestObjectEnum.A, GridBinaryTestClasses.TestObjectEnum.B};
 
         BinaryObjectBuilderImpl mutObj = wrap(obj);
 
         BinaryBuilderEnum[] arr = mutObj.getField("enumArr");
-        arr[0] = new BinaryBuilderEnum(mutObj.typeId(), GridPortableTestClasses.TestObjectEnum.B);
+        arr[0] = new BinaryBuilderEnum(mutObj.typeId(), GridBinaryTestClasses.TestObjectEnum.B);
 
-        GridPortableTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes res = mutObj.build().deserialize();
 
-        Assert.assertArrayEquals(new GridPortableTestClasses.TestObjectEnum[] {GridPortableTestClasses.TestObjectEnum.A, GridPortableTestClasses.TestObjectEnum.B}, res.enumArr);
+        Assert.assertArrayEquals(new GridBinaryTestClasses.TestObjectEnum[] {GridBinaryTestClasses.TestObjectEnum.A, GridBinaryTestClasses.TestObjectEnum.B}, res.enumArr);
     }
 
     /**
@@ -877,7 +877,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testHashCode() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutableObj = wrap(obj);
 
@@ -892,7 +892,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testCollectionsInCollection() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
         obj.foo = Lists.newArrayList(
             Lists.newArrayList(1, 2),
             Lists.newLinkedList(Arrays.asList(1, 2)),
@@ -900,7 +900,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
             Sets.newLinkedHashSet(Arrays.asList("a", "b")),
             Maps.newHashMap(ImmutableMap.of(1, "a", 2, "b")));
 
-        GridPortableTestClasses.TestObjectContainer deserialized = wrap(obj).build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = wrap(obj).build().deserialize();
 
         assertEquals(obj.foo, deserialized.foo);
     }
@@ -909,13 +909,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMapEntryOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutableObj = wrap(obj);
 
         mutableObj.setField("foo", new GridMapEntry<>(1, "a"));
 
-        GridPortableTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
 
         assertEquals(new GridMapEntry<>(1, "a"), res.foo);
     }
@@ -924,14 +924,14 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMetadataChangingDoublePut() {
-        BinaryObjectBuilderImpl mutableObj = wrap(new GridPortableTestClasses.TestObjectContainer());
+        BinaryObjectBuilderImpl mutableObj = wrap(new GridBinaryTestClasses.TestObjectContainer());
 
         mutableObj.setField("xx567", "a");
         mutableObj.setField("xx567", "b");
 
         mutableObj.build();
 
-        BinaryType metadata = portables().type(GridPortableTestClasses.TestObjectContainer.class);
+        BinaryType metadata = portables().type(GridBinaryTestClasses.TestObjectContainer.class);
 
         assertEquals("String", metadata.fieldTypeName("xx567"));
     }
@@ -940,14 +940,14 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMetadataChangingDoublePut2() {
-        BinaryObjectBuilderImpl mutableObj = wrap(new GridPortableTestClasses.TestObjectContainer());
+        BinaryObjectBuilderImpl mutableObj = wrap(new GridBinaryTestClasses.TestObjectContainer());
 
         mutableObj.setField("xx567", "a");
         mutableObj.setField("xx567", "b");
 
         mutableObj.build();
 
-        BinaryType metadata = portables().type(GridPortableTestClasses.TestObjectContainer.class);
+        BinaryType metadata = portables().type(GridBinaryTestClasses.TestObjectContainer.class);
 
         assertEquals("String", metadata.fieldTypeName("xx567"));
     }
@@ -956,7 +956,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testMetadataChanging() {
-        GridPortableTestClasses.TestObjectContainer c = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer c = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutableObj = wrap(c);
 
@@ -966,8 +966,8 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
         mutableObj.setField("strField", "1");
         mutableObj.setField("colField", Lists.newArrayList("1"));
         mutableObj.setField("mapField", Maps.newHashMap(ImmutableMap.of(1, "1")));
-        mutableObj.setField("enumField", GridPortableTestClasses.TestObjectEnum.A);
-        mutableObj.setField("enumArrField", new Enum[] {GridPortableTestClasses.TestObjectEnum.A});
+        mutableObj.setField("enumField", GridBinaryTestClasses.TestObjectEnum.A);
+        mutableObj.setField("enumArrField", new Enum[] {GridBinaryTestClasses.TestObjectEnum.A});
 
         mutableObj.build();
 
@@ -990,7 +990,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDateInObjectField() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         obj.foo = new Date();
 
@@ -1003,7 +1003,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testTimestampInObjectField() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         obj.foo = new Timestamp(100020003);
 
@@ -1016,7 +1016,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testDateInCollection() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         obj.foo = Lists.newArrayList(new Date());
 
@@ -1029,7 +1029,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testTimestampInCollection() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         obj.foo = Lists.newArrayList(new Timestamp(100020003));
 
@@ -1043,7 +1043,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      */
     @SuppressWarnings("AssertEqualsBetweenInconvertibleTypes")
     public void testDateArrayOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutableObj = wrap(obj);
 
@@ -1051,7 +1051,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutableObj.setField("foo", arr);
 
-        GridPortableTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
 
         assertEquals(Date[].class, res.foo.getClass());
         assertTrue(Objects.deepEquals(arr, res.foo));
@@ -1062,7 +1062,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      */
     @SuppressWarnings("AssertEqualsBetweenInconvertibleTypes")
     public void testTimestampArrayOverride() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl mutableObj = wrap(obj);
 
@@ -1070,7 +1070,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         mutableObj.setField("foo", arr);
 
-        GridPortableTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = mutableObj.build().deserialize();
 
         assertEquals(Timestamp[].class, res.foo.getClass());
         assertTrue(Objects.deepEquals(arr, res.foo));
@@ -1080,19 +1080,19 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testChangeMap() {
-        GridPortableTestClasses.Addresses addrs = new GridPortableTestClasses.Addresses();
+        GridBinaryTestClasses.Addresses addrs = new GridBinaryTestClasses.Addresses();
 
-        addrs.addCompany(new GridPortableTestClasses.Company(1, "Google inc", 100,
-            new GridPortableTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 53), "occupation"));
+        addrs.addCompany(new GridBinaryTestClasses.Company(1, "Google inc", 100,
+            new GridBinaryTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 53), "occupation"));
 
-        addrs.addCompany(new GridPortableTestClasses.Company(2, "Apple inc", 100,
-            new GridPortableTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 54), "occupation"));
+        addrs.addCompany(new GridBinaryTestClasses.Company(2, "Apple inc", 100,
+            new GridBinaryTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 54), "occupation"));
 
-        addrs.addCompany(new GridPortableTestClasses.Company(3, "Microsoft", 100,
-            new GridPortableTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 55), "occupation"));
+        addrs.addCompany(new GridBinaryTestClasses.Company(3, "Microsoft", 100,
+            new GridBinaryTestClasses.Address("Saint-Petersburg", "Torzhkovskya", 1, 55), "occupation"));
 
-        addrs.addCompany(new GridPortableTestClasses.Company(4, "Oracle", 100,
-            new GridPortableTestClasses.Address("Saint-Petersburg", "Nevskiy", 1, 1), "occupation"));
+        addrs.addCompany(new GridBinaryTestClasses.Company(4, "Oracle", 100,
+            new GridBinaryTestClasses.Address("Saint-Petersburg", "Nevskiy", 1, 1), "occupation"));
 
         BinaryObjectBuilderImpl binaryAddres = wrap(addrs);
 
@@ -1108,11 +1108,11 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         binaryCompaniesList.remove(0);
 
-        GridPortableTestClasses.Addresses res = binaryAddres.build().deserialize();
+        GridBinaryTestClasses.Addresses res = binaryAddres.build().deserialize();
 
         assertEquals(Arrays.asList("Nevskiy", "Torzhkovskya"), new ArrayList<>(res.getCompanyByStreet().keySet()));
 
-        GridPortableTestClasses.Companies torzhkovskyaCompanies = res.getCompanyByStreet().get("Torzhkovskya");
+        GridBinaryTestClasses.Companies torzhkovskyaCompanies = res.getCompanyByStreet().get("Torzhkovskya");
 
         assertEquals(2, torzhkovskyaCompanies.size());
         assertEquals("Apple inc", torzhkovskyaCompanies.get(0).name);
@@ -1122,8 +1122,8 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testSavingObjectWithNotZeroStart() {
-        GridPortableTestClasses.TestObjectOuter out = new GridPortableTestClasses.TestObjectOuter();
-        GridPortableTestClasses.TestObjectInner inner = new GridPortableTestClasses.TestObjectInner();
+        GridBinaryTestClasses.TestObjectOuter out = new GridBinaryTestClasses.TestObjectOuter();
+        GridBinaryTestClasses.TestObjectInner inner = new GridBinaryTestClasses.TestObjectInner();
 
         out.inner = inner;
         inner.outer = out;
@@ -1132,7 +1132,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         BinaryObjectBuilderImpl innerBuilder = builder.getField("inner");
 
-        GridPortableTestClasses.TestObjectInner res = innerBuilder.build().deserialize();
+        GridBinaryTestClasses.TestObjectInner res = innerBuilder.build().deserialize();
 
         assertSame(res, res.outer.inner);
     }
@@ -1141,13 +1141,13 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testPortableObjectField() {
-        GridPortableTestClasses.TestObjectContainer container = new GridPortableTestClasses.TestObjectContainer(toPortable(new GridPortableTestClasses.TestObjectArrayList()));
+        GridBinaryTestClasses.TestObjectContainer container = new GridBinaryTestClasses.TestObjectContainer(toPortable(new GridBinaryTestClasses.TestObjectArrayList()));
 
         BinaryObjectBuilderImpl wrapper = wrap(container);
 
         assertTrue(wrapper.getField("foo") instanceof BinaryObject);
 
-        GridPortableTestClasses.TestObjectContainer deserialized = wrapper.build().deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = wrapper.build().deserialize();
         assertTrue(deserialized.foo instanceof BinaryObject);
     }
 
@@ -1155,48 +1155,48 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      *
      */
     public void testAssignPortableObject() {
-        GridPortableTestClasses.TestObjectContainer container = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer container = new GridBinaryTestClasses.TestObjectContainer();
 
         BinaryObjectBuilderImpl wrapper = wrap(container);
 
-        wrapper.setField("foo", toPortable(new GridPortableTestClasses.TestObjectArrayList()));
+        wrapper.setField("foo", toPortable(new GridBinaryTestClasses.TestObjectArrayList()));
 
-        GridPortableTestClasses.TestObjectContainer deserialized = wrapper.build().deserialize();
-        assertTrue(deserialized.foo instanceof GridPortableTestClasses.TestObjectArrayList);
+        GridBinaryTestClasses.TestObjectContainer deserialized = wrapper.build().deserialize();
+        assertTrue(deserialized.foo instanceof GridBinaryTestClasses.TestObjectArrayList);
     }
 
     /**
      *
      */
     public void testRemoveFromNewObject() {
-        BinaryObjectBuilderImpl wrapper = newWrapper(GridPortableTestClasses.TestObjectAllTypes.class);
+        BinaryObjectBuilderImpl wrapper = newWrapper(GridBinaryTestClasses.TestObjectAllTypes.class);
 
         wrapper.setField("str", "a");
 
         wrapper.removeField("str");
 
-        TestCase.assertNull(wrapper.build().<GridPortableTestClasses.TestObjectAllTypes>deserialize().str);
+        TestCase.assertNull(wrapper.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
     }
 
     /**
      *
      */
     public void testRemoveFromExistingObject() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
         obj.setDefaultData();
 
         BinaryObjectBuilderImpl wrapper = wrap(toPortable(obj));
 
         wrapper.removeField("str");
 
-        TestCase.assertNull(wrapper.build().<GridPortableTestClasses.TestObjectAllTypes>deserialize().str);
+        TestCase.assertNull(wrapper.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
     }
 
     /**
      *
      */
     public void testCyclicArrays() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         Object[] arr1 = new Object[1];
         Object[] arr2 = new Object[] {arr1};
@@ -1205,7 +1205,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         obj.foo = arr1;
 
-        GridPortableTestClasses.TestObjectContainer res = toPortable(obj).deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = toPortable(obj).deserialize();
 
         Object[] resArr = (Object[])res.foo;
 
@@ -1217,7 +1217,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
      */
     @SuppressWarnings("TypeMayBeWeakened")
     public void testCyclicArrayList() {
-        GridPortableTestClasses.TestObjectContainer obj = new GridPortableTestClasses.TestObjectContainer();
+        GridBinaryTestClasses.TestObjectContainer obj = new GridBinaryTestClasses.TestObjectContainer();
 
         List<Object> arr1 = new ArrayList<>();
         List<Object> arr2 = new ArrayList<>();
@@ -1227,7 +1227,7 @@ public class BinaryObjectBuilderAdditionalSelfTest extends GridCommonAbstractTes
 
         obj.foo = arr1;
 
-        GridPortableTestClasses.TestObjectContainer res = toPortable(obj).deserialize();
+        GridBinaryTestClasses.TestObjectContainer res = toPortable(obj).deserialize();
 
         List<?> resArr = (List<?>)res.foo;
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderSelfTest.java
index d02347c..2a3fe53 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/BinaryObjectBuilderSelfTest.java
@@ -36,7 +36,7 @@ import org.apache.ignite.binary.BinaryType;
 import org.apache.ignite.binary.BinaryTypeConfiguration;
 import org.apache.ignite.configuration.BinaryConfiguration;
 import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.binary.mutabletest.GridPortableTestClasses;
+import org.apache.ignite.internal.binary.mutabletest.GridBinaryTestClasses;
 import org.apache.ignite.internal.binary.builder.BinaryObjectBuilderImpl;
 import org.apache.ignite.internal.processors.cache.binary.CacheObjectBinaryProcessorImpl;
 import org.apache.ignite.internal.util.GridUnsafe;
@@ -111,11 +111,11 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
      *
      */
     public void testAllFieldsSerialization() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
         obj.setDefaultData();
         obj.enumArr = null;
 
-        GridPortableTestClasses.TestObjectAllTypes deserialized = builder(toPortable(obj)).build().deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes deserialized = builder(toPortable(obj)).build().deserialize();
 
         GridTestUtils.deepEquals(obj, deserialized);
     }
@@ -868,7 +868,7 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
      *
      */
     public void testGetFromCopiedObj() {
-        BinaryObject objStr = builder(GridPortableTestClasses.TestObjectAllTypes.class.getName()).setField("str", "aaa").build();
+        BinaryObject objStr = builder(GridBinaryTestClasses.TestObjectAllTypes.class.getName()).setField("str", "aaa").build();
 
         BinaryObjectBuilderImpl builder = builder(objStr);
         assertEquals("aaa", builder.getField("str"));
@@ -877,7 +877,7 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
         assertEquals("bbb", builder.getField("str"));
 
         assertNull(builder.getField("i_"));
-        TestCase.assertEquals("bbb", builder.build().<GridPortableTestClasses.TestObjectAllTypes>deserialize().str);
+        TestCase.assertEquals("bbb", builder.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
     }
 
     /**
@@ -886,46 +886,46 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
     @SuppressWarnings("unchecked")
     public void testCopyFromInnerObjects() {
         ArrayList<Object> list = new ArrayList<>();
-        list.add(new GridPortableTestClasses.TestObjectAllTypes());
+        list.add(new GridBinaryTestClasses.TestObjectAllTypes());
         list.add(list.get(0));
 
-        GridPortableTestClasses.TestObjectContainer c = new GridPortableTestClasses.TestObjectContainer(list);
+        GridBinaryTestClasses.TestObjectContainer c = new GridBinaryTestClasses.TestObjectContainer(list);
 
         BinaryObjectBuilderImpl builder = builder(toPortable(c));
         builder.<List>getField("foo").add("!!!");
 
         BinaryObject res = builder.build();
 
-        GridPortableTestClasses.TestObjectContainer deserialized = res.deserialize();
+        GridBinaryTestClasses.TestObjectContainer deserialized = res.deserialize();
 
         List deserializedList = (List)deserialized.foo;
 
         assertSame(deserializedList.get(0), deserializedList.get(1));
         assertEquals("!!!", deserializedList.get(2));
-        assertTrue(deserializedList.get(0) instanceof GridPortableTestClasses.TestObjectAllTypes);
+        assertTrue(deserializedList.get(0) instanceof GridBinaryTestClasses.TestObjectAllTypes);
     }
 
     /**
      *
      */
     public void testSetPortableObject() {
-        BinaryObject portableObj = builder(GridPortableTestClasses.TestObjectContainer.class.getName())
-            .setField("foo", toPortable(new GridPortableTestClasses.TestObjectAllTypes()))
+        BinaryObject portableObj = builder(GridBinaryTestClasses.TestObjectContainer.class.getName())
+            .setField("foo", toPortable(new GridBinaryTestClasses.TestObjectAllTypes()))
             .build();
 
-        assertTrue(portableObj.<GridPortableTestClasses.TestObjectContainer>deserialize().foo instanceof GridPortableTestClasses.TestObjectAllTypes);
+        assertTrue(portableObj.<GridBinaryTestClasses.TestObjectContainer>deserialize().foo instanceof GridBinaryTestClasses.TestObjectAllTypes);
     }
 
     /**
      *
      */
     public void testPlainPortableObjectCopyFrom() {
-        GridPortableTestClasses.TestObjectPlainPortable obj = new GridPortableTestClasses.TestObjectPlainPortable(toPortable(new GridPortableTestClasses.TestObjectAllTypes()));
+        GridBinaryTestClasses.TestObjectPlainPortable obj = new GridBinaryTestClasses.TestObjectPlainPortable(toPortable(new GridBinaryTestClasses.TestObjectAllTypes()));
 
         BinaryObjectBuilderImpl builder = builder(toPortable(obj));
         assertTrue(builder.getField("plainPortable") instanceof BinaryObject);
 
-        GridPortableTestClasses.TestObjectPlainPortable deserialized = builder.build().deserialize();
+        GridBinaryTestClasses.TestObjectPlainPortable deserialized = builder.build().deserialize();
         assertTrue(deserialized.plainPortable != null);
     }
 
@@ -933,20 +933,20 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
      *
      */
     public void testRemoveFromNewObject() {
-        BinaryObjectBuilder builder = builder(GridPortableTestClasses.TestObjectAllTypes.class.getName());
+        BinaryObjectBuilder builder = builder(GridBinaryTestClasses.TestObjectAllTypes.class.getName());
 
         builder.setField("str", "a");
 
         builder.removeField("str");
 
-        TestCase.assertNull(builder.build().<GridPortableTestClasses.TestObjectAllTypes>deserialize().str);
+        TestCase.assertNull(builder.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
     }
 
     /**
      *
      */
     public void testRemoveFromExistingObject() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
         obj.setDefaultData();
         obj.enumArr = null;
 
@@ -956,7 +956,7 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
 
         BinaryObject binary = builder.build();
 
-        GridPortableTestClasses.TestObjectAllTypes deserialzied = binary.deserialize();
+        GridBinaryTestClasses.TestObjectAllTypes deserialzied = binary.deserialize();
 
         assertNull(deserialzied.str);
     }
@@ -965,7 +965,7 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
      *
      */
     public void testRemoveFromExistingObjectAfterGet() {
-        GridPortableTestClasses.TestObjectAllTypes obj = new GridPortableTestClasses.TestObjectAllTypes();
+        GridBinaryTestClasses.TestObjectAllTypes obj = new GridBinaryTestClasses.TestObjectAllTypes();
         obj.setDefaultData();
         obj.enumArr = null;
 
@@ -975,15 +975,15 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
 
         builder.removeField("str");
 
-        TestCase.assertNull(builder.build().<GridPortableTestClasses.TestObjectAllTypes>deserialize().str);
+        TestCase.assertNull(builder.build().<GridBinaryTestClasses.TestObjectAllTypes>deserialize().str);
     }
 
     /**
      * @throws IgniteCheckedException If any error occurs.
      */
     public void testDontBrokeCyclicDependency() throws IgniteCheckedException {
-        GridPortableTestClasses.TestObjectOuter outer = new GridPortableTestClasses.TestObjectOuter();
-        outer.inner = new GridPortableTestClasses.TestObjectInner();
+        GridBinaryTestClasses.TestObjectOuter outer = new GridBinaryTestClasses.TestObjectOuter();
+        outer.inner = new GridBinaryTestClasses.TestObjectInner();
         outer.inner.outer = outer;
         outer.foo = "a";
 
@@ -991,7 +991,7 @@ public class BinaryObjectBuilderSelfTest extends GridCommonAbstractTest {
 
         builder.setField("foo", "b");
 
-        GridPortableTestClasses.TestObjectOuter res = builder.build().deserialize();
+        GridBinaryTestClasses.TestObjectOuter res = builder.build().deserialize();
 
         assertEquals("b", res.foo);
         assertSame(res, res.inner.outer);

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMetaDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMetaDataSelfTest.java
new file mode 100644
index 0000000..970cbc7
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryMetaDataSelfTest.java
@@ -0,0 +1,371 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.binary;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.HashMap;
+import org.apache.ignite.IgniteBinary;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.CacheConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.Binarylizable;
+import org.apache.ignite.binary.BinaryType;
+import org.apache.ignite.binary.BinaryObject;
+import org.apache.ignite.binary.BinaryRawWriter;
+import org.apache.ignite.binary.BinaryReader;
+import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+/**
+ * Portable meta data test.
+ */
+public class GridBinaryMetaDataSelfTest extends GridCommonAbstractTest {
+    /** */
+    private static int idx;
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        BinaryConfiguration bCfg = new BinaryConfiguration();
+
+        bCfg.setClassNames(Arrays.asList(TestObject1.class.getName(), TestObject2.class.getName()));
+
+        cfg.setBinaryConfiguration(bCfg);
+
+        cfg.setMarshaller(new BinaryMarshaller());
+
+        CacheConfiguration ccfg = new CacheConfiguration();
+
+        cfg.setCacheConfiguration(ccfg);
+
+        return cfg;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void beforeTest() throws Exception {
+        idx = 0;
+
+        startGrid();
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void afterTest() throws Exception {
+        stopGrid();
+    }
+
+    /**
+     * @return Portables API.
+     */
+    protected IgniteBinary portables() {
+        return grid().binary();
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testGetAll() throws Exception {
+        portables().toBinary(new TestObject2());
+
+        Collection<BinaryType> metas = portables().types();
+
+        assertEquals(2, metas.size());
+
+        for (BinaryType meta : metas) {
+            Collection<String> fields;
+
+            switch (meta.typeName()) {
+                case "TestObject1":
+                    fields = meta.fieldNames();
+
+                    assertEquals(7, fields.size());
+
+                    assertTrue(fields.contains("intVal"));
+                    assertTrue(fields.contains("strVal"));
+                    assertTrue(fields.contains("arrVal"));
+                    assertTrue(fields.contains("obj1Val"));
+                    assertTrue(fields.contains("obj2Val"));
+                    assertTrue(fields.contains("decVal"));
+                    assertTrue(fields.contains("decArrVal"));
+
+                    assertEquals("int", meta.fieldTypeName("intVal"));
+                    assertEquals("String", meta.fieldTypeName("strVal"));
+                    assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+                    assertEquals("Object", meta.fieldTypeName("obj1Val"));
+                    assertEquals("Object", meta.fieldTypeName("obj2Val"));
+                    assertEquals("decimal", meta.fieldTypeName("decVal"));
+                    assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+
+                    break;
+
+                case "TestObject2":
+                    fields = meta.fieldNames();
+
+                    assertEquals(7, fields.size());
+
+                    assertTrue(fields.contains("boolVal"));
+                    assertTrue(fields.contains("dateVal"));
+                    assertTrue(fields.contains("uuidArrVal"));
+                    assertTrue(fields.contains("objVal"));
+                    assertTrue(fields.contains("mapVal"));
+                    assertTrue(fields.contains("decVal"));
+                    assertTrue(fields.contains("decArrVal"));
+
+                    assertEquals("boolean", meta.fieldTypeName("boolVal"));
+                    assertEquals("Date", meta.fieldTypeName("dateVal"));
+                    assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+                    assertEquals("Object", meta.fieldTypeName("objVal"));
+                    assertEquals("Map", meta.fieldTypeName("mapVal"));
+                    assertEquals("decimal", meta.fieldTypeName("decVal"));
+                    assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+
+                    break;
+
+                default:
+                    assert false : meta.typeName();
+            }
+        }
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testNoConfiguration() throws Exception {
+        portables().toBinary(new TestObject3());
+
+        assertNotNull(portables().type(TestObject3.class));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testReflection() throws Exception {
+        BinaryType meta = portables().type(TestObject1.class);
+
+        assertNotNull(meta);
+
+        assertEquals("TestObject1", meta.typeName());
+
+        Collection<String> fields = meta.fieldNames();
+
+        assertEquals(7, fields.size());
+
+        assertTrue(fields.contains("intVal"));
+        assertTrue(fields.contains("strVal"));
+        assertTrue(fields.contains("arrVal"));
+        assertTrue(fields.contains("obj1Val"));
+        assertTrue(fields.contains("obj2Val"));
+        assertTrue(fields.contains("decVal"));
+        assertTrue(fields.contains("decArrVal"));
+
+        assertEquals("int", meta.fieldTypeName("intVal"));
+        assertEquals("String", meta.fieldTypeName("strVal"));
+        assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+        assertEquals("Object", meta.fieldTypeName("obj1Val"));
+        assertEquals("Object", meta.fieldTypeName("obj2Val"));
+        assertEquals("decimal", meta.fieldTypeName("decVal"));
+        assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testPortableMarshalAware() throws Exception {
+        portables().toBinary(new TestObject2());
+
+        BinaryType meta = portables().type(TestObject2.class);
+
+        assertNotNull(meta);
+
+        assertEquals("TestObject2", meta.typeName());
+
+        Collection<String> fields = meta.fieldNames();
+
+        assertEquals(7, fields.size());
+
+        assertTrue(fields.contains("boolVal"));
+        assertTrue(fields.contains("dateVal"));
+        assertTrue(fields.contains("uuidArrVal"));
+        assertTrue(fields.contains("objVal"));
+        assertTrue(fields.contains("mapVal"));
+        assertTrue(fields.contains("decVal"));
+        assertTrue(fields.contains("decArrVal"));
+
+        assertEquals("boolean", meta.fieldTypeName("boolVal"));
+        assertEquals("Date", meta.fieldTypeName("dateVal"));
+        assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+        assertEquals("Object", meta.fieldTypeName("objVal"));
+        assertEquals("Map", meta.fieldTypeName("mapVal"));
+        assertEquals("decimal", meta.fieldTypeName("decVal"));
+        assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testMerge() throws Exception {
+        portables().toBinary(new TestObject2());
+
+        idx = 1;
+
+        portables().toBinary(new TestObject2());
+
+        BinaryType meta = portables().type(TestObject2.class);
+
+        assertNotNull(meta);
+
+        assertEquals("TestObject2", meta.typeName());
+
+        Collection<String> fields = meta.fieldNames();
+
+        assertEquals(9, fields.size());
+
+        assertTrue(fields.contains("boolVal"));
+        assertTrue(fields.contains("dateVal"));
+        assertTrue(fields.contains("uuidArrVal"));
+        assertTrue(fields.contains("objVal"));
+        assertTrue(fields.contains("mapVal"));
+        assertTrue(fields.contains("charVal"));
+        assertTrue(fields.contains("colVal"));
+        assertTrue(fields.contains("decVal"));
+        assertTrue(fields.contains("decArrVal"));
+
+        assertEquals("boolean", meta.fieldTypeName("boolVal"));
+        assertEquals("Date", meta.fieldTypeName("dateVal"));
+        assertEquals("UUID[]", meta.fieldTypeName("uuidArrVal"));
+        assertEquals("Object", meta.fieldTypeName("objVal"));
+        assertEquals("Map", meta.fieldTypeName("mapVal"));
+        assertEquals("char", meta.fieldTypeName("charVal"));
+        assertEquals("Collection", meta.fieldTypeName("colVal"));
+        assertEquals("decimal", meta.fieldTypeName("decVal"));
+        assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testSerializedObject() throws Exception {
+        TestObject1 obj = new TestObject1();
+
+        obj.intVal = 10;
+        obj.strVal = "str";
+        obj.arrVal = new byte[] {2, 4, 6};
+        obj.obj1Val = null;
+        obj.obj2Val = new TestObject2();
+        obj.decVal = BigDecimal.ZERO;
+        obj.decArrVal = new BigDecimal[] { BigDecimal.ONE };
+
+        BinaryObject po = portables().toBinary(obj);
+
+        info(po.toString());
+
+        BinaryType meta = po.type();
+
+        assertNotNull(meta);
+
+        assertEquals("TestObject1", meta.typeName());
+
+        Collection<String> fields = meta.fieldNames();
+
+        assertEquals(7, fields.size());
+
+        assertTrue(fields.contains("intVal"));
+        assertTrue(fields.contains("strVal"));
+        assertTrue(fields.contains("arrVal"));
+        assertTrue(fields.contains("obj1Val"));
+        assertTrue(fields.contains("obj2Val"));
+        assertTrue(fields.contains("decVal"));
+        assertTrue(fields.contains("decArrVal"));
+
+        assertEquals("int", meta.fieldTypeName("intVal"));
+        assertEquals("String", meta.fieldTypeName("strVal"));
+        assertEquals("byte[]", meta.fieldTypeName("arrVal"));
+        assertEquals("Object", meta.fieldTypeName("obj1Val"));
+        assertEquals("Object", meta.fieldTypeName("obj2Val"));
+        assertEquals("decimal", meta.fieldTypeName("decVal"));
+        assertEquals("decimal[]", meta.fieldTypeName("decArrVal"));
+    }
+
+    /**
+     */
+    @SuppressWarnings("UnusedDeclaration")
+    private static class TestObject1 {
+        /** */
+        private int intVal;
+
+        /** */
+        private String strVal;
+
+        /** */
+        private byte[] arrVal;
+
+        /** */
+        private TestObject1 obj1Val;
+
+        /** */
+        private TestObject2 obj2Val;
+
+        /** */
+        private BigDecimal decVal;
+
+        /** */
+        private BigDecimal[] decArrVal;
+    }
+
+    /**
+     */
+    private static class TestObject2 implements Binarylizable {
+        /** {@inheritDoc} */
+        @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
+            writer.writeBoolean("boolVal", false);
+            writer.writeDate("dateVal", new Date());
+            writer.writeUuidArray("uuidArrVal", null);
+            writer.writeObject("objVal", null);
+            writer.writeMap("mapVal", new HashMap<>());
+            writer.writeDecimal("decVal", BigDecimal.ZERO);
+            writer.writeDecimalArray("decArrVal", new BigDecimal[] { BigDecimal.ONE });
+
+            if (idx == 1) {
+                writer.writeChar("charVal", (char)0);
+                writer.writeCollection("colVal", null);
+            }
+
+            BinaryRawWriter raw = writer.rawWriter();
+
+            raw.writeChar((char)0);
+            raw.writeCollection(null);
+        }
+
+        /** {@inheritDoc} */
+        @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
+            // No-op.
+        }
+    }
+
+    /**
+     */
+    @SuppressWarnings("UnusedDeclaration")
+    private static class TestObject3 {
+        /** */
+        private int intVal;
+    }
+}


Mime
View raw message