You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2015/12/11 16:10:42 UTC

[1/3] ignite git commit: ignite-2065: rename "portable" classes to "binary" (in tests)

Repository: ignite
Updated Branches:
  refs/heads/ignite-1.5 71ad9cead -> 469bf6d62


http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java
new file mode 100644
index 0000000..13b374c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.processors.cache.binary.distributed.dht;
+
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAbstractNearPartitionedByteArrayValuesSelfTest;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+
+/**
+ *
+ */
+public class GridCacheBinariesNearPartitionedByteArrayValuesSelfTest
+    extends GridCacheAbstractNearPartitionedByteArrayValuesSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean peerClassLoading() {
+        return false;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
+        IgniteConfiguration cfg = super.getConfiguration(gridName);
+
+        cfg.setMarshaller(new BinaryMarshaller());
+
+        return cfg;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCachePortablesNearPartitionedByteArrayValuesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCachePortablesNearPartitionedByteArrayValuesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCachePortablesNearPartitionedByteArrayValuesSelfTest.java
deleted file mode 100644
index 9c1572e..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/distributed/dht/GridCachePortablesNearPartitionedByteArrayValuesSelfTest.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * 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.processors.cache.binary.distributed.dht;
-
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.processors.cache.distributed.near.GridCacheAbstractNearPartitionedByteArrayValuesSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-
-/**
- *
- */
-public class GridCachePortablesNearPartitionedByteArrayValuesSelfTest
-    extends GridCacheAbstractNearPartitionedByteArrayValuesSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean peerClassLoading() {
-        return false;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception {
-        IgniteConfiguration cfg = super.getConfiguration(gridName);
-
-        cfg.setMarshaller(new BinaryMarshaller());
-
-        return cfg;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheFullApiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheFullApiTestSuite.java
new file mode 100644
index 0000000..3dc78cc
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheFullApiTestSuite.java
@@ -0,0 +1,37 @@
+/*
+ * 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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Cache full API suite with portable marshaller.
+ */
+public class IgniteBinaryCacheFullApiTestSuite extends TestSuite {
+    /**
+     * @return Suite.
+     * @throws Exception In case of error.
+     */
+    public static TestSuite suite() throws Exception {
+        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+
+        return IgniteCacheFullApiSelfTestSuite.suite();
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
new file mode 100644
index 0000000..729bebe
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheTestSuite.java
@@ -0,0 +1,101 @@
+/*
+ * 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.testsuites;
+
+import java.util.HashSet;
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheMvccSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest;
+import org.apache.ignite.internal.processors.cache.binary.GridBinaryCacheEntryMemorySizeSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.datastreaming.DataStreamProcessorBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.datastreaming.GridDataStreamerImplSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAffinityRoutingBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheMemoryModeBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredAtomicBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionAtomicBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredBinarySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesNearPartitionedByteArrayValuesSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest;
+import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Cache suite with portable marshaller.
+ */
+public class IgniteBinaryCacheTestSuite extends TestSuite {
+    /**
+     * @return Suite.
+     * @throws Exception In case of error.
+     */
+    public static TestSuite suite() throws Exception {
+        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+
+        TestSuite suite = new TestSuite("Portable Cache Test Suite");
+
+        HashSet<Class> ignoredTests = new HashSet<>();
+
+        // Tests below have a special version for Portable Marshaller
+        ignoredTests.add(DataStreamProcessorSelfTest.class);
+        ignoredTests.add(GridCacheOffHeapTieredEvictionAtomicSelfTest.class);
+        ignoredTests.add(GridCacheOffHeapTieredEvictionSelfTest.class);
+        ignoredTests.add(GridCacheOffHeapTieredSelfTest.class);
+        ignoredTests.add(GridCacheOffHeapTieredAtomicSelfTest.class);
+        ignoredTests.add(GridCacheAffinityRoutingSelfTest.class);
+        ignoredTests.add(IgniteCacheAtomicLocalExpiryPolicyTest.class);
+        ignoredTests.add(GridCacheEntryMemorySizeSelfTest.class);
+
+        // Tests that are not ready to be used with PortableMarshaller
+        ignoredTests.add(GridCacheMvccSelfTest.class);
+
+        suite.addTest(IgniteCacheTestSuite.suite(ignoredTests));
+
+        suite.addTestSuite(GridCacheMemoryModeBinarySelfTest.class);
+        suite.addTestSuite(GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.class);
+        suite.addTestSuite(GridCacheOffHeapTieredEvictionBinarySelfTest.class);
+
+        suite.addTestSuite(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class);
+        suite.addTestSuite(GridCacheBinariesNearPartitionedByteArrayValuesSelfTest.class);
+        suite.addTestSuite(GridCacheOffHeapTieredBinarySelfTest.class);
+        suite.addTestSuite(GridCacheOffHeapTieredAtomicBinarySelfTest.class);
+
+        suite.addTestSuite(GridDataStreamerImplSelfTest.class);
+        suite.addTestSuite(DataStreamProcessorBinarySelfTest.class);
+        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest.class);
+
+        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest.class);
+        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest.class);
+
+        suite.addTestSuite(GridCacheAffinityRoutingBinarySelfTest.class);
+        suite.addTestSuite(GridBinaryCacheEntryMemorySizeSelfTest.class);
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
new file mode 100644
index 0000000..271ff33
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/testsuites/IgniteBinaryObjectsTestSuite.java
@@ -0,0 +1,114 @@
+/*
+ * 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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.binary.BinaryEnumsSelfTest;
+import org.apache.ignite.internal.binary.GridBinaryAffinityKeySelfTest;
+import org.apache.ignite.internal.binary.BinaryObjectBuilderAdditionalSelfTest;
+import org.apache.ignite.internal.binary.BinaryObjectBuilderSelfTest;
+import org.apache.ignite.internal.binary.GridBinaryMarshallerCtxDisabledSelfTest;
+import org.apache.ignite.internal.binary.BinaryMarshallerSelfTest;
+import org.apache.ignite.internal.binary.GridBinaryMetaDataSelfTest;
+import org.apache.ignite.internal.binary.GridBinaryWildcardsSelfTest;
+import org.apache.ignite.internal.binary.BinaryFooterOffsetsHeapSelfTest;
+import org.apache.ignite.internal.binary.BinaryFooterOffsetsOffheapSelfTest;
+import org.apache.ignite.internal.binary.BinaryFieldsHeapSelfTest;
+import org.apache.ignite.internal.binary.BinaryFieldsOffheapSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryFieldsHeapNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryFieldsOffheapNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsHeapNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsOffheapNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryMarshallerNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderAdditionalNonCompactSelfTest;
+import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSelfTest;
+import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreObjectsSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreBinariesSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicOffheapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.replicated.GridCacheBinaryObjectsReplicatedSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsAtomicLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalOffheapTieredSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest;
+
+/**
+ * Test for portable objects stored in cache.
+ */
+public class IgniteBinaryObjectsTestSuite extends TestSuite {
+    /**
+     * @return Suite.
+     * @throws Exception If failed.
+     */
+    public static TestSuite suite() throws Exception {
+        TestSuite suite = new TestSuite("Ignite Binary Objects Test Suite");
+
+        suite.addTestSuite(BinaryMarshallerSelfTest.class);
+        suite.addTestSuite(GridBinaryMarshallerCtxDisabledSelfTest.class);
+        suite.addTestSuite(BinaryObjectBuilderSelfTest.class);
+        suite.addTestSuite(BinaryObjectBuilderAdditionalSelfTest.class);
+        suite.addTestSuite(BinaryFieldsHeapSelfTest.class);
+        suite.addTestSuite(BinaryFieldsOffheapSelfTest.class);
+        suite.addTestSuite(BinaryFooterOffsetsHeapSelfTest.class);
+        suite.addTestSuite(BinaryFooterOffsetsOffheapSelfTest.class);
+        suite.addTestSuite(BinaryEnumsSelfTest.class);
+        suite.addTestSuite(GridBinaryMetaDataSelfTest.class);
+        suite.addTestSuite(GridBinaryAffinityKeySelfTest.class);
+        suite.addTestSuite(GridBinaryWildcardsSelfTest.class);
+
+        // Tests for objects with non-compact footers.
+        suite.addTestSuite(BinaryMarshallerNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryObjectBuilderNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryObjectBuilderAdditionalNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryFieldsHeapNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryFieldsOffheapNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryFooterOffsetsHeapNonCompactSelfTest.class);
+        suite.addTestSuite(BinaryFooterOffsetsOffheapNonCompactSelfTest.class);
+
+        suite.addTestSuite(GridCacheBinaryObjectsLocalSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsAtomicLocalSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsReplicatedSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsPartitionedSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsAtomicSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class);
+
+        suite.addTestSuite(GridCacheBinaryObjectsLocalOffheapTieredSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.class);
+
+        suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryStoreBinariesSelfTest.class);
+
+        suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataTest.class);
+        suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class);
+        suite.addTestSuite(IgniteBinaryMetadataUpdateChangingTopologySelfTest.class);
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheFullApiTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheFullApiTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheFullApiTestSuite.java
deleted file mode 100644
index 3ba5b45..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheFullApiTestSuite.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.testsuites;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.testframework.config.GridTestProperties;
-
-/**
- * Cache full API suite with portable marshaller.
- */
-public class IgnitePortableCacheFullApiTestSuite extends TestSuite {
-    /**
-     * @return Suite.
-     * @throws Exception In case of error.
-     */
-    public static TestSuite suite() throws Exception {
-        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
-
-        return IgniteCacheFullApiSelfTestSuite.suite();
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheTestSuite.java
deleted file mode 100644
index f5745d8..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheTestSuite.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.testsuites;
-
-import java.util.HashSet;
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.internal.processors.cache.GridCacheAffinityRoutingSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheEntryMemorySizeSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheMvccSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredEvictionSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheOffHeapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.expiry.IgniteCacheAtomicLocalExpiryPolicyTest;
-import org.apache.ignite.internal.processors.cache.binary.GridBinaryCacheEntryMemorySizeSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.datastreaming.DataStreamProcessorBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.datastreaming.GridDataStreamerImplSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAffinityRoutingBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheMemoryModeBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionAtomicBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredEvictionBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheOffHeapTieredBinarySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCachePortablesNearPartitionedByteArrayValuesSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest;
-import org.apache.ignite.internal.processors.datastreamer.DataStreamProcessorSelfTest;
-import org.apache.ignite.testframework.config.GridTestProperties;
-
-/**
- * Cache suite with portable marshaller.
- */
-public class IgnitePortableCacheTestSuite extends TestSuite {
-    /**
-     * @return Suite.
-     * @throws Exception In case of error.
-     */
-    public static TestSuite suite() throws Exception {
-        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
-
-        TestSuite suite = new TestSuite("Portable Cache Test Suite");
-
-        HashSet<Class> ignoredTests = new HashSet<>();
-
-        // Tests below have a special version for Portable Marshaller
-        ignoredTests.add(DataStreamProcessorSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredEvictionAtomicSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredEvictionSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredSelfTest.class);
-        ignoredTests.add(GridCacheOffHeapTieredAtomicSelfTest.class);
-        ignoredTests.add(GridCacheAffinityRoutingSelfTest.class);
-        ignoredTests.add(IgniteCacheAtomicLocalExpiryPolicyTest.class);
-        ignoredTests.add(GridCacheEntryMemorySizeSelfTest.class);
-
-        // Tests that are not ready to be used with PortableMarshaller
-        ignoredTests.add(GridCacheMvccSelfTest.class);
-
-        suite.addTest(IgniteCacheTestSuite.suite(ignoredTests));
-
-        suite.addTestSuite(GridCacheMemoryModeBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionAtomicBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredEvictionBinarySelfTest.class);
-
-        suite.addTestSuite(GridCacheBinariesPartitionedOnlyByteArrayValuesSelfTest.class);
-        suite.addTestSuite(GridCachePortablesNearPartitionedByteArrayValuesSelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredBinarySelfTest.class);
-        suite.addTestSuite(GridCacheOffHeapTieredAtomicBinarySelfTest.class);
-
-        suite.addTestSuite(GridDataStreamerImplSelfTest.class);
-        suite.addTestSuite(DataStreamProcessorBinarySelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultiNodeSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryDataStreamerMultithreadedSelfTest.class);
-
-        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultiNodeSelfTest.class);
-        suite.addTestSuite(GridCacheAtomicPartitionedOnlyBinaryMultithreadedSelfTest.class);
-
-        suite.addTestSuite(GridCacheAffinityRoutingBinarySelfTest.class);
-        suite.addTestSuite(GridBinaryCacheEntryMemorySizeSelfTest.class);
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java b/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
deleted file mode 100644
index 942a5fa..0000000
--- a/modules/core/src/test/java/org/apache/ignite/testsuites/IgnitePortableObjectsTestSuite.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.testsuites;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.binary.BinaryEnumsSelfTest;
-import org.apache.ignite.internal.binary.GridBinaryAffinityKeySelfTest;
-import org.apache.ignite.internal.binary.BinaryObjectBuilderAdditionalSelfTest;
-import org.apache.ignite.internal.binary.BinaryObjectBuilderSelfTest;
-import org.apache.ignite.internal.binary.GridBinaryMarshallerCtxDisabledSelfTest;
-import org.apache.ignite.internal.binary.BinaryMarshallerSelfTest;
-import org.apache.ignite.internal.binary.GridPortableMetaDataSelfTest;
-import org.apache.ignite.internal.binary.GridPortableWildcardsSelfTest;
-import org.apache.ignite.internal.binary.BinaryFooterOffsetsHeapSelfTest;
-import org.apache.ignite.internal.binary.BinaryFooterOffsetsOffheapSelfTest;
-import org.apache.ignite.internal.binary.BinaryFieldsHeapSelfTest;
-import org.apache.ignite.internal.binary.BinaryFieldsOffheapSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryFieldsHeapNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryFieldsOffheapNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsHeapNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryFooterOffsetsOffheapNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryMarshallerNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderAdditionalNonCompactSelfTest;
-import org.apache.ignite.internal.binary.noncompact.BinaryObjectBuilderNonCompactSelfTest;
-import org.apache.ignite.internal.processors.cache.distributed.IgniteBinaryMetadataUpdateChangingTopologySelfTest;
-import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataMultinodeTest;
-import org.apache.ignite.internal.processors.cache.binary.GridCacheClientNodeBinaryObjectMetadataTest;
-import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStoreObjectsSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.GridCacheBinaryStorePortablesSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedNearDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryObjectsPartitionedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.replicated.GridCacheBinaryObjectsReplicatedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsAtomicLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalOffheapTieredSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.local.GridCacheBinaryObjectsLocalSelfTest;
-
-/**
- * Test for portable objects stored in cache.
- */
-public class IgnitePortableObjectsTestSuite extends TestSuite {
-    /**
-     * @return Suite.
-     * @throws Exception If failed.
-     */
-    public static TestSuite suite() throws Exception {
-        TestSuite suite = new TestSuite("Ignite Binary Objects Test Suite");
-
-        suite.addTestSuite(BinaryMarshallerSelfTest.class);
-        suite.addTestSuite(GridBinaryMarshallerCtxDisabledSelfTest.class);
-        suite.addTestSuite(BinaryObjectBuilderSelfTest.class);
-        suite.addTestSuite(BinaryObjectBuilderAdditionalSelfTest.class);
-        suite.addTestSuite(BinaryFieldsHeapSelfTest.class);
-        suite.addTestSuite(BinaryFieldsOffheapSelfTest.class);
-        suite.addTestSuite(BinaryFooterOffsetsHeapSelfTest.class);
-        suite.addTestSuite(BinaryFooterOffsetsOffheapSelfTest.class);
-        suite.addTestSuite(BinaryEnumsSelfTest.class);
-        suite.addTestSuite(GridPortableMetaDataSelfTest.class);
-        suite.addTestSuite(GridBinaryAffinityKeySelfTest.class);
-        suite.addTestSuite(GridPortableWildcardsSelfTest.class);
-
-        // Tests for objects with non-compact footers.
-        suite.addTestSuite(BinaryMarshallerNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryObjectBuilderNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryObjectBuilderAdditionalNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryFieldsHeapNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryFieldsOffheapNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryFooterOffsetsHeapNonCompactSelfTest.class);
-        suite.addTestSuite(BinaryFooterOffsetsOffheapNonCompactSelfTest.class);
-
-        suite.addTestSuite(GridCacheBinaryObjectsLocalSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicLocalSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsReplicatedSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledSelfTest.class);
-
-        suite.addTestSuite(GridCacheBinaryObjectsLocalOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsAtomicNearDisabledOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedOffheapTieredSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryObjectsPartitionedNearDisabledOffheapTieredSelfTest.class);
-
-        suite.addTestSuite(GridCacheBinaryStoreObjectsSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryStorePortablesSelfTest.class);
-
-        suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataTest.class);
-        suite.addTestSuite(GridCacheClientNodeBinaryObjectMetadataMultinodeTest.class);
-        suite.addTestSuite(IgniteBinaryMetadataUpdateChangingTopologySelfTest.class);
-
-        return suite;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
new file mode 100644
index 0000000..daf9c45
--- /dev/null
+++ b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgniteBinaryCacheQueryTestSuite.java
@@ -0,0 +1,119 @@
+/*
+ * 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.testsuites;
+
+import junit.framework.TestSuite;
+import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
+import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
+import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
+import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsLocalSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheLargeResultSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest;
+import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryLocalAtomicSelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedOnlySelfTest;
+import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicSelfTest;
+import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
+import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
+import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
+import org.apache.ignite.internal.binary.BinaryMarshaller;
+import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
+import org.apache.ignite.testframework.config.GridTestProperties;
+
+/**
+ * Cache query suite with portable marshaller.
+ */
+public class IgniteBinaryCacheQueryTestSuite extends TestSuite {
+    /**
+     * @return Suite.
+     * @throws Exception In case of error.
+     */
+    public static TestSuite suite() throws Exception {
+        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
+
+        TestSuite suite = new TestSuite("Grid Cache Query Test Suite using PortableMarshaller");
+
+        // Parsing
+        suite.addTestSuite(GridQueryParsingTest.class);
+
+        // Queries tests.
+        suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class);
+        suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class);
+        suite.addTestSuite(IgniteCacheLargeResultSelfTest.class);
+        suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
+        suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
+        suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
+
+        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
+        suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
+
+
+        // Fields queries.
+        suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class);
+        suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class);
+
+        // Continuous queries.
+        suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class);
+        suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicSelfTest.class);
+        suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
+        suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
+        suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
+        suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
+
+        suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
+
+        //Should be adjusted. Not ready to be used with PortableMarshaller.
+        //suite.addTestSuite(GridCachePortableSwapScanQuerySelfTest.class);
+
+        suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
+
+        // Ignite cache and H2 comparison.
+        suite.addTestSuite(BaseH2CompareQueryTest.class);
+        suite.addTestSuite(H2CompareBigQueryTest.class);
+
+        // Metrics tests
+        suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
+        suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
+        suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
+        suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
+        suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);
+
+        //Unmarshallig query test.
+        suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);
+
+        suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.class);
+        suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.class);
+
+        return suite;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheQueryTestSuite.java
----------------------------------------------------------------------
diff --git a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheQueryTestSuite.java b/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheQueryTestSuite.java
deleted file mode 100644
index 2df9026..0000000
--- a/modules/indexing/src/test/java/org/apache/ignite/testsuites/IgnitePortableCacheQueryTestSuite.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * 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.testsuites;
-
-import junit.framework.TestSuite;
-import org.apache.ignite.internal.processors.cache.CacheLocalQueryMetricsSelfTest;
-import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsDistributedSelfTest;
-import org.apache.ignite.internal.processors.cache.CachePartitionedQueryMetricsLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsDistributedSelfTest;
-import org.apache.ignite.internal.processors.cache.CacheReplicatedQueryMetricsLocalSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheQueryIndexingDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.GridCacheReduceQueryMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteBinaryObjectFieldsQuerySelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheFieldsQueryNoDataSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheLargeResultSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheOffheapTieredMultithreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheP2pUnmarshallingQueryErrorTest;
-import org.apache.ignite.internal.processors.cache.IgniteCachePartitionedQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryEvictsMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.IgniteCacheQueryOffheapMultiThreadedSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.binary.distributed.dht.GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicNearEnabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicP2PDisabledSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryLocalAtomicSelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryPartitionedOnlySelfTest;
-import org.apache.ignite.internal.processors.cache.query.continuous.GridCacheContinuousQueryReplicatedAtomicSelfTest;
-import org.apache.ignite.internal.processors.query.h2.sql.BaseH2CompareQueryTest;
-import org.apache.ignite.internal.processors.query.h2.sql.GridQueryParsingTest;
-import org.apache.ignite.internal.processors.query.h2.sql.H2CompareBigQueryTest;
-import org.apache.ignite.internal.binary.BinaryMarshaller;
-import org.apache.ignite.spi.communication.tcp.GridOrderedMessageCancelSelfTest;
-import org.apache.ignite.testframework.config.GridTestProperties;
-
-/**
- * Cache query suite with portable marshaller.
- */
-public class IgnitePortableCacheQueryTestSuite extends TestSuite {
-    /**
-     * @return Suite.
-     * @throws Exception In case of error.
-     */
-    public static TestSuite suite() throws Exception {
-        GridTestProperties.setProperty(GridTestProperties.MARSH_CLASS_NAME, BinaryMarshaller.class.getName());
-
-        TestSuite suite = new TestSuite("Grid Cache Query Test Suite using PortableMarshaller");
-
-        // Parsing
-        suite.addTestSuite(GridQueryParsingTest.class);
-
-        // Queries tests.
-        suite.addTestSuite(GridCacheQueryIndexDisabledSelfTest.class);
-        suite.addTestSuite(IgniteCachePartitionedQueryMultiThreadedSelfTest.class);
-        suite.addTestSuite(IgniteCacheLargeResultSelfTest.class);
-        suite.addTestSuite(IgniteCacheQueryMultiThreadedSelfTest.class);
-        suite.addTestSuite(IgniteCacheQueryEvictsMultiThreadedSelfTest.class);
-        suite.addTestSuite(IgniteCacheQueryOffheapMultiThreadedSelfTest.class);
-
-        suite.addTestSuite(IgniteCacheOffheapTieredMultithreadedSelfTest.class);
-        suite.addTestSuite(GridCacheReduceQueryMultithreadedSelfTest.class);
-
-
-        // Fields queries.
-        suite.addTestSuite(IgniteCacheFieldsQueryNoDataSelfTest.class);
-        suite.addTestSuite(IgniteBinaryObjectFieldsQuerySelfTest.class);
-
-        // Continuous queries.
-        suite.addTestSuite(GridCacheContinuousQueryLocalAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryReplicatedAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryPartitionedOnlySelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryAtomicNearEnabledSelfTest.class);
-        suite.addTestSuite(GridCacheContinuousQueryAtomicP2PDisabledSelfTest.class);
-
-        suite.addTestSuite(GridCacheQueryIndexingDisabledSelfTest.class);
-
-        //Should be adjusted. Not ready to be used with PortableMarshaller.
-        //suite.addTestSuite(GridCachePortableSwapScanQuerySelfTest.class);
-
-        suite.addTestSuite(GridOrderedMessageCancelSelfTest.class);
-
-        // Ignite cache and H2 comparison.
-        suite.addTestSuite(BaseH2CompareQueryTest.class);
-        suite.addTestSuite(H2CompareBigQueryTest.class);
-
-        // Metrics tests
-        suite.addTestSuite(CacheLocalQueryMetricsSelfTest.class);
-        suite.addTestSuite(CachePartitionedQueryMetricsDistributedSelfTest.class);
-        suite.addTestSuite(CachePartitionedQueryMetricsLocalSelfTest.class);
-        suite.addTestSuite(CacheReplicatedQueryMetricsDistributedSelfTest.class);
-        suite.addTestSuite(CacheReplicatedQueryMetricsLocalSelfTest.class);
-
-        //Unmarshallig query test.
-        suite.addTestSuite(IgniteCacheP2pUnmarshallingQueryErrorTest.class);
-
-        suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedAtomicSelfTest.class);
-        suite.addTestSuite(GridCacheBinaryDuplicateIndexObjectPartitionedTransactionalSelfTest.class);
-
-        return suite;
-    }
-}


[2/3] ignite git commit: ignite-2065: rename "portable" classes to "binary" (in tests)

Posted by sb...@apache.org.
http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java
new file mode 100644
index 0000000..9cf1242
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridBinaryWildcardsSelfTest.java
@@ -0,0 +1,464 @@
+/*
+ * 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.util.Collection;
+import org.apache.ignite.IgniteCheckedException;
+import org.apache.ignite.binary.BinaryIdMapper;
+import org.apache.ignite.binary.BinarySerializer;
+import org.apache.ignite.binary.BinaryTypeConfiguration;
+import org.apache.ignite.configuration.BinaryConfiguration;
+import org.apache.ignite.configuration.IgniteConfiguration;
+import org.apache.ignite.internal.util.IgniteUtils;
+import org.apache.ignite.internal.util.typedef.internal.U;
+import org.apache.ignite.marshaller.MarshallerContextTestImpl;
+import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
+
+import java.util.Arrays;
+import java.util.Map;
+
+/**
+ * Wildcards test.
+ */
+public class GridBinaryWildcardsSelfTest extends GridCommonAbstractTest {
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClassNames() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
+        assertTrue(typeIds.containsKey("innerclass".hashCode()));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClassNamesWithMapper() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else if (clsName.endsWith("InnerClass"))
+                    return 500;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurations() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
+        assertTrue(typeIds.containsKey("innerclass".hashCode()));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurationsWithGlobalMapper() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else if (clsName.endsWith("InnerClass"))
+                    return 500;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurationsWithNonGlobalMapper() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else if (clsName.endsWith("InnerClass"))
+                    return 500;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOverride() throws Exception {
+        BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration();
+
+        typeCfg.setTypeName("GridPortableTestClass2");
+        typeCfg.setIdMapper(new BinaryIdMapper() {
+            @Override public int typeId(String clsName) {
+                return 100;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        });
+
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
+            typeCfg));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+        assertTrue(typeIds.containsKey("innerclass".hashCode()));
+        assertFalse(typeIds.containsKey("gridportabletestclass2".hashCode()));
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(100, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClassNamesJar() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testClassNamesWithMapperJar() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurationsJar() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurationsWithGlobalMapperJar() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testTypeConfigurationsWithNonGlobalMapperJar() throws Exception {
+        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
+            @SuppressWarnings("IfMayBeConditional")
+            @Override public int typeId(String clsName) {
+                if (clsName.endsWith("1"))
+                    return 300;
+                else if (clsName.endsWith("2"))
+                    return 400;
+                else
+                    return -500;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        }, Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            new BinaryTypeConfiguration("unknown.*")
+        ));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
+        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    public void testOverrideJar() throws Exception {
+        BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration(
+            "org.apache.ignite.binary.testjar.GridPortableTestClass2");
+
+        typeCfg.setIdMapper(new BinaryIdMapper() {
+            @Override public int typeId(String clsName) {
+                return 100;
+            }
+
+            @Override public int fieldId(int typeId, String fieldName) {
+                return 0;
+            }
+        });
+
+        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
+            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
+            typeCfg));
+
+        BinaryContext ctx = portableContext(marsh);
+
+        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
+
+        assertEquals(3, typeIds.size());
+
+        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
+
+        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
+
+        assertEquals(3, typeMappers.size());
+
+        assertEquals(100, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
+    }
+
+    /**
+     * @param marsh Marshaller.
+     * @return Portable context.
+     */
+    protected BinaryContext portableContext(BinaryMarshaller marsh) {
+        GridBinaryMarshaller impl = U.field(marsh, "impl");
+
+        return impl.context();
+    }
+
+    /**
+     *
+     */
+    protected BinaryMarshaller portableMarshaller()
+        throws IgniteCheckedException {
+        return portableMarshaller(null, null, null);
+    }
+
+    /**
+     *
+     */
+    protected BinaryMarshaller portableMarshaller(Collection<BinaryTypeConfiguration> cfgs)
+        throws IgniteCheckedException {
+        return portableMarshaller(null, null, cfgs);
+    }
+
+    /**
+     *
+     */
+    protected BinaryMarshaller portableMarshaller(BinaryIdMapper mapper, Collection<BinaryTypeConfiguration> cfgs)
+        throws IgniteCheckedException {
+        return portableMarshaller(mapper, null, cfgs);
+    }
+
+    /**
+     *
+     */
+    protected BinaryMarshaller portableMarshaller(BinarySerializer serializer, Collection<BinaryTypeConfiguration> cfgs)
+        throws IgniteCheckedException {
+        return portableMarshaller(null, serializer, cfgs);
+    }
+
+    protected BinaryMarshaller portableMarshaller(
+        BinaryIdMapper mapper,
+        BinarySerializer serializer,
+        Collection<BinaryTypeConfiguration> cfgs
+    ) throws IgniteCheckedException {
+        IgniteConfiguration iCfg = new IgniteConfiguration();
+
+        BinaryConfiguration bCfg = new BinaryConfiguration();
+
+        bCfg.setIdMapper(mapper);
+        bCfg.setSerializer(serializer);
+
+        bCfg.setTypeConfigurations(cfgs);
+
+        iCfg.setBinaryConfiguration(bCfg);
+
+        BinaryContext ctx = new BinaryContext(BinaryNoopMetadataHandler.instance(), iCfg);
+
+        BinaryMarshaller marsh = new BinaryMarshaller();
+
+        marsh.setContext(new MarshallerContextTestImpl(null));
+
+        IgniteUtils.invoke(BinaryMarshaller.class, marsh, "setPortableContext", ctx, iCfg);
+
+        return marsh;
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableMetaDataSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableMetaDataSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableMetaDataSelfTest.java
deleted file mode 100644
index 5d74e12..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableMetaDataSelfTest.java
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * 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 GridPortableMetaDataSelfTest 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;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableWildcardsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableWildcardsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableWildcardsSelfTest.java
deleted file mode 100644
index 9226272..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/GridPortableWildcardsSelfTest.java
+++ /dev/null
@@ -1,464 +0,0 @@
-/*
- * 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.util.Collection;
-import org.apache.ignite.IgniteCheckedException;
-import org.apache.ignite.binary.BinaryIdMapper;
-import org.apache.ignite.binary.BinarySerializer;
-import org.apache.ignite.binary.BinaryTypeConfiguration;
-import org.apache.ignite.configuration.BinaryConfiguration;
-import org.apache.ignite.configuration.IgniteConfiguration;
-import org.apache.ignite.internal.util.IgniteUtils;
-import org.apache.ignite.internal.util.typedef.internal.U;
-import org.apache.ignite.marshaller.MarshallerContextTestImpl;
-import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest;
-
-import java.util.Arrays;
-import java.util.Map;
-
-/**
- * Wildcards test.
- */
-public class GridPortableWildcardsSelfTest extends GridCommonAbstractTest {
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClassNames() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
-        assertTrue(typeIds.containsKey("innerclass".hashCode()));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClassNamesWithMapper() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else if (clsName.endsWith("InnerClass"))
-                    return 500;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurations() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
-        assertTrue(typeIds.containsKey("innerclass".hashCode()));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurationsWithGlobalMapper() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else if (clsName.endsWith("InnerClass"))
-                    return 500;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurationsWithNonGlobalMapper() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else if (clsName.endsWith("InnerClass"))
-                    return 500;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-        assertEquals(500, typeMappers.get("InnerClass").typeId("InnerClass"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOverride() throws Exception {
-        BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration();
-
-        typeCfg.setTypeName("GridPortableTestClass2");
-        typeCfg.setIdMapper(new BinaryIdMapper() {
-            @Override public int typeId(String clsName) {
-                return 100;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        });
-
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.internal.binary.test.*"),
-            typeCfg));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-        assertTrue(typeIds.containsKey("innerclass".hashCode()));
-        assertFalse(typeIds.containsKey("gridportabletestclass2".hashCode()));
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(100, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClassNamesJar() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testClassNamesWithMapperJar() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurationsJar() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-        assertTrue(typeIds.containsKey("gridportabletestclass2".hashCode()));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurationsWithGlobalMapperJar() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testTypeConfigurationsWithNonGlobalMapperJar() throws Exception {
-        BinaryMarshaller marsh = portableMarshaller(new BinaryIdMapper() {
-            @SuppressWarnings("IfMayBeConditional")
-            @Override public int typeId(String clsName) {
-                if (clsName.endsWith("1"))
-                    return 300;
-                else if (clsName.endsWith("2"))
-                    return 400;
-                else
-                    return -500;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        }, Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            new BinaryTypeConfiguration("unknown.*")
-        ));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(300, typeMappers.get("GridPortableTestClass1").typeId("GridPortableTestClass1"));
-        assertEquals(400, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-    }
-
-    /**
-     * @throws Exception If failed.
-     */
-    public void testOverrideJar() throws Exception {
-        BinaryTypeConfiguration typeCfg = new BinaryTypeConfiguration(
-            "org.apache.ignite.binary.testjar.GridPortableTestClass2");
-
-        typeCfg.setIdMapper(new BinaryIdMapper() {
-            @Override public int typeId(String clsName) {
-                return 100;
-            }
-
-            @Override public int fieldId(int typeId, String fieldName) {
-                return 0;
-            }
-        });
-
-        BinaryMarshaller marsh = portableMarshaller(Arrays.asList(
-            new BinaryTypeConfiguration("org.apache.ignite.binary.testjar.*"),
-            typeCfg));
-
-        BinaryContext ctx = portableContext(marsh);
-
-        Map<Integer, Class> typeIds = U.field(ctx, "userTypes");
-
-        assertEquals(3, typeIds.size());
-
-        assertTrue(typeIds.containsKey("gridportabletestclass1".hashCode()));
-
-        Map<String, BinaryIdMapper> typeMappers = U.field(ctx, "typeMappers");
-
-        assertEquals(3, typeMappers.size());
-
-        assertEquals(100, typeMappers.get("GridPortableTestClass2").typeId("GridPortableTestClass2"));
-    }
-
-    /**
-     * @param marsh Marshaller.
-     * @return Portable context.
-     */
-    protected BinaryContext portableContext(BinaryMarshaller marsh) {
-        GridBinaryMarshaller impl = U.field(marsh, "impl");
-
-        return impl.context();
-    }
-
-    /**
-     *
-     */
-    protected BinaryMarshaller portableMarshaller()
-        throws IgniteCheckedException {
-        return portableMarshaller(null, null, null);
-    }
-
-    /**
-     *
-     */
-    protected BinaryMarshaller portableMarshaller(Collection<BinaryTypeConfiguration> cfgs)
-        throws IgniteCheckedException {
-        return portableMarshaller(null, null, cfgs);
-    }
-
-    /**
-     *
-     */
-    protected BinaryMarshaller portableMarshaller(BinaryIdMapper mapper, Collection<BinaryTypeConfiguration> cfgs)
-        throws IgniteCheckedException {
-        return portableMarshaller(mapper, null, cfgs);
-    }
-
-    /**
-     *
-     */
-    protected BinaryMarshaller portableMarshaller(BinarySerializer serializer, Collection<BinaryTypeConfiguration> cfgs)
-        throws IgniteCheckedException {
-        return portableMarshaller(null, serializer, cfgs);
-    }
-
-    protected BinaryMarshaller portableMarshaller(
-        BinaryIdMapper mapper,
-        BinarySerializer serializer,
-        Collection<BinaryTypeConfiguration> cfgs
-    ) throws IgniteCheckedException {
-        IgniteConfiguration iCfg = new IgniteConfiguration();
-
-        BinaryConfiguration bCfg = new BinaryConfiguration();
-
-        bCfg.setIdMapper(mapper);
-        bCfg.setSerializer(serializer);
-
-        bCfg.setTypeConfigurations(cfgs);
-
-        iCfg.setBinaryConfiguration(bCfg);
-
-        BinaryContext ctx = new BinaryContext(BinaryNoopMetadataHandler.instance(), iCfg);
-
-        BinaryMarshaller marsh = new BinaryMarshaller();
-
-        marsh.setContext(new MarshallerContextTestImpl(null));
-
-        IgniteUtils.invoke(BinaryMarshaller.class, marsh, "setPortableContext", ctx, iCfg);
-
-        return marsh;
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
new file mode 100644
index 0000000..0170f99
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridBinaryTestClasses.java
@@ -0,0 +1,484 @@
+/*
+ * 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.mutabletest;
+
+import com.google.common.base.Throwables;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectOutput;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.UUID;
+
+import org.apache.ignite.binary.BinaryMapFactory;
+import org.apache.ignite.binary.BinaryObjectException;
+import org.apache.ignite.binary.BinaryReader;
+import org.apache.ignite.binary.BinaryWriter;
+import org.apache.ignite.binary.Binarylizable;
+import org.apache.ignite.internal.util.lang.GridMapEntry;
+import org.apache.ignite.binary.BinaryObject;
+
+/**
+ *
+ */
+@SuppressWarnings({"PublicInnerClass", "PublicField"})
+public class GridBinaryTestClasses {
+    /**
+     *
+     */
+    public static class TestObjectContainer {
+        /** */
+        public Object foo;
+
+        /**
+         *
+         */
+        public TestObjectContainer() {
+            // No-op.
+        }
+
+        /**
+         * @param foo Object.
+         */
+        public TestObjectContainer(Object foo) {
+            this.foo = foo;
+        }
+    }
+
+    /**
+     *
+     */
+    public static class TestObjectOuter {
+        /** */
+        public TestObjectInner inner;
+
+        /** */
+        public String foo;
+
+        /**
+         *
+         */
+        public TestObjectOuter() {
+
+        }
+
+        /**
+         * @param inner Inner object.
+         */
+        public TestObjectOuter(TestObjectInner inner) {
+            this.inner = inner;
+        }
+    }
+
+    /** */
+    public static class TestObjectInner {
+        /** */
+        public Object foo;
+
+        /** */
+        public TestObjectOuter outer;
+    }
+
+    /** */
+    public static class TestObjectArrayList {
+        /** */
+        public List<String> list = new ArrayList<>();
+    }
+
+    /**
+     *
+     */
+    public static class TestObjectPlainPortable {
+        /** */
+        public BinaryObject plainPortable;
+
+        /**
+         *
+         */
+        public TestObjectPlainPortable() {
+            // No-op.
+        }
+
+        /**
+         * @param plainPortable Object.
+         */
+        public TestObjectPlainPortable(BinaryObject plainPortable) {
+            this.plainPortable = plainPortable;
+        }
+    }
+
+    /**
+     *
+     */
+    public static class TestObjectAllTypes implements Serializable {
+        /** */
+        public Byte b_;
+
+        /** */
+        public Short s_;
+
+        /** */
+        public Integer i_;
+
+        /** */
+        public Long l_;
+
+        /** */
+        public Float f_;
+
+        /** */
+        public Double d_;
+
+        /** */
+        public Character c_;
+
+        /** */
+        public Boolean z_;
+
+        /** */
+        public byte b;
+
+        /** */
+        public short s;
+
+        /** */
+        public int i;
+
+        /** */
+        public long l;
+
+        /** */
+        public float f;
+
+        /** */
+        public double d;
+
+        /** */
+        public char c;
+
+        /** */
+        public boolean z;
+
+        /** */
+        public String str;
+
+        /** */
+        public UUID uuid;
+
+        /** */
+        public Date date;
+
+        /** */
+        public Timestamp ts;
+
+        /** */
+        public byte[] bArr;
+
+        /** */
+        public short[] sArr;
+
+        /** */
+        public int[] iArr;
+
+        /** */
+        public long[] lArr;
+
+        /** */
+        public float[] fArr;
+
+        /** */
+        public double[] dArr;
+
+        /** */
+        public char[] cArr;
+
+        /** */
+        public boolean[] zArr;
+
+        /** */
+        public BigDecimal[] bdArr;
+
+        /** */
+        public String[] strArr;
+
+        /** */
+        public UUID[] uuidArr;
+
+        /** */
+        public Date[] dateArr;
+
+        /** */
+        public Timestamp[] tsArr;
+
+        /** */
+        public TestObjectEnum anEnum;
+
+        /** */
+        public TestObjectEnum[] enumArr;
+
+        /** */
+        public Map.Entry entry;
+
+        /**
+         * @return Array.
+         */
+        private byte[] serialize() {
+            ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
+
+            try {
+                ObjectOutput out = new ObjectOutputStream(byteOut);
+
+                out.writeObject(this);
+
+                out.close();
+            }
+            catch (IOException e) {
+                Throwables.propagate(e);
+            }
+
+            return byteOut.toByteArray();
+        }
+
+        /**
+         *
+         */
+        public void setDefaultData() {
+            b_ = 11;
+            s_ = 22;
+            i_ = 33;
+            l_ = 44L;
+            f_ = 55f;
+            d_ = 66d;
+            c_ = 'e';
+            z_ = true;
+
+            b = 1;
+            s = 2;
+            i = 3;
+            l = 4;
+            f = 5;
+            d = 6;
+            c = 7;
+            z = true;
+
+            str = "abc";
+            uuid = new UUID(1, 1);
+            date = new Date(1000000);
+            ts = new Timestamp(100020003);
+
+            bArr = new byte[] {1, 2, 3};
+            sArr = new short[] {1, 2, 3};
+            iArr = new int[] {1, 2, 3};
+            lArr = new long[] {1, 2, 3};
+            fArr = new float[] {1, 2, 3};
+            dArr = new double[] {1, 2, 3};
+            cArr = new char[] {1, 2, 3};
+            zArr = new boolean[] {true, false};
+
+            strArr = new String[] {"abc", "ab", "a"};
+            uuidArr = new UUID[] {new UUID(1, 1), new UUID(2, 2)};
+            bdArr = new BigDecimal[] {new BigDecimal(1000), BigDecimal.TEN};
+            dateArr = new Date[] {new Date(1000000), new Date(200000)};
+            tsArr = new Timestamp[] {new Timestamp(100020003), new Timestamp(200030004)};
+
+            anEnum = TestObjectEnum.A;
+
+            enumArr = new TestObjectEnum[] {TestObjectEnum.B};
+
+            entry = new GridMapEntry<>(1, "a");
+        }
+    }
+
+    /**
+     *
+     */
+    public enum TestObjectEnum {
+        A, B, C
+    }
+
+    /**
+     *
+     */
+    public static class Address implements Serializable {
+        /** SUID. */
+        private static final long serialVersionUID = 0L;
+
+        /** City. */
+        public String city;
+
+        /** Street. */
+        public String street;
+
+        /** Street number. */
+        public int streetNumber;
+
+        /** Flat number. */
+        public int flatNumber;
+
+        /**
+         * Default constructor.
+         */
+        public Address() {
+            // No-op.
+        }
+
+        /**
+         * Constructor.
+         *
+         * @param city City.
+         * @param street Street.
+         * @param streetNumber Street number.
+         * @param flatNumber Flat number.
+         */
+        public Address(String city, String street, int streetNumber, int flatNumber) {
+            this.city = city;
+            this.street = street;
+            this.streetNumber = streetNumber;
+            this.flatNumber = flatNumber;
+        }
+    }
+
+    /**
+     *
+     */
+    public static class Company implements Serializable {
+        /** SUID. */
+        private static final long serialVersionUID = 0L;
+
+        /** ID. */
+        public int id;
+
+        /** Name. */
+        public String name;
+
+        /** Size. */
+        public int size;
+
+        /** Address. */
+        public Address address;
+
+        /** Occupation. */
+        public String occupation;
+
+        /**
+         * Default constructor.
+         */
+        public Company() {
+            // No-op.
+        }
+
+        /**
+         * Constructor.
+         *
+         * @param id ID.
+         * @param name Name.
+         * @param size Size.
+         * @param address Address.
+         * @param occupation Occupation.
+         */
+        public Company(int id, String name, int size, Address address, String occupation) {
+            this.id = id;
+            this.name = name;
+            this.size = size;
+            this.address = address;
+            this.occupation = occupation;
+        }
+    }
+
+    /**
+     * Companies.
+     */
+    public static class Companies {
+        /** Companies. */
+        private List<Company> companies = new ArrayList<>();
+
+        /**
+         * @param idx Index.
+         * @return Company.
+         */
+        public Company get(int idx) {
+            return companies.get(idx);
+        }
+
+        /**
+         * @param company Company.
+         */
+        public void add(Company company) {
+            companies.add(company);
+        }
+
+        /**
+         * @return Size.
+         */
+        public int size() {
+            return companies.size();
+        }
+    }
+
+    /**
+     *
+     */
+    public static class Addresses implements Binarylizable {
+        /** */
+        private Map<String, Companies> companyByStreet = new TreeMap<>();
+
+        /**
+         * @param company Company.
+         */
+        public void addCompany(Company company) {
+            Companies list = companyByStreet.get(company.address.street);
+
+            if (list == null) {
+                list = new Companies();
+
+                companyByStreet.put(company.address.street, list);
+            }
+
+            list.add(company);
+        }
+
+        /**
+         * @return map
+         */
+        public Map<String, Companies> getCompanyByStreet() {
+            return companyByStreet;
+        }
+
+        /** {@inheritDoc} */
+        @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
+            writer.writeMap("companyByStreet", companyByStreet);
+        }
+
+        /** {@inheritDoc} */
+        @SuppressWarnings("unchecked")
+        @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
+            companyByStreet = reader.readMap("companyByStreet", new BinaryMapFactory<String, Companies>() {
+                @Override public Map<String, Companies> create(int size) {
+                    return new TreeMap<>();
+                }
+            });
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridPortableTestClasses.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridPortableTestClasses.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridPortableTestClasses.java
deleted file mode 100644
index 3a4a4b6..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/mutabletest/GridPortableTestClasses.java
+++ /dev/null
@@ -1,484 +0,0 @@
-/*
- * 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.mutabletest;
-
-import com.google.common.base.Throwables;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.math.BigDecimal;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.UUID;
-
-import org.apache.ignite.binary.BinaryMapFactory;
-import org.apache.ignite.binary.BinaryObjectException;
-import org.apache.ignite.binary.BinaryReader;
-import org.apache.ignite.binary.BinaryWriter;
-import org.apache.ignite.binary.Binarylizable;
-import org.apache.ignite.internal.util.lang.GridMapEntry;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- *
- */
-@SuppressWarnings({"PublicInnerClass", "PublicField"})
-public class GridPortableTestClasses {
-    /**
-     *
-     */
-    public static class TestObjectContainer {
-        /** */
-        public Object foo;
-
-        /**
-         *
-         */
-        public TestObjectContainer() {
-            // No-op.
-        }
-
-        /**
-         * @param foo Object.
-         */
-        public TestObjectContainer(Object foo) {
-            this.foo = foo;
-        }
-    }
-
-    /**
-     *
-     */
-    public static class TestObjectOuter {
-        /** */
-        public TestObjectInner inner;
-
-        /** */
-        public String foo;
-
-        /**
-         *
-         */
-        public TestObjectOuter() {
-
-        }
-
-        /**
-         * @param inner Inner object.
-         */
-        public TestObjectOuter(TestObjectInner inner) {
-            this.inner = inner;
-        }
-    }
-
-    /** */
-    public static class TestObjectInner {
-        /** */
-        public Object foo;
-
-        /** */
-        public TestObjectOuter outer;
-    }
-
-    /** */
-    public static class TestObjectArrayList {
-        /** */
-        public List<String> list = new ArrayList<>();
-    }
-
-    /**
-     *
-     */
-    public static class TestObjectPlainPortable {
-        /** */
-        public BinaryObject plainPortable;
-
-        /**
-         *
-         */
-        public TestObjectPlainPortable() {
-            // No-op.
-        }
-
-        /**
-         * @param plainPortable Object.
-         */
-        public TestObjectPlainPortable(BinaryObject plainPortable) {
-            this.plainPortable = plainPortable;
-        }
-    }
-
-    /**
-     *
-     */
-    public static class TestObjectAllTypes implements Serializable {
-        /** */
-        public Byte b_;
-
-        /** */
-        public Short s_;
-
-        /** */
-        public Integer i_;
-
-        /** */
-        public Long l_;
-
-        /** */
-        public Float f_;
-
-        /** */
-        public Double d_;
-
-        /** */
-        public Character c_;
-
-        /** */
-        public Boolean z_;
-
-        /** */
-        public byte b;
-
-        /** */
-        public short s;
-
-        /** */
-        public int i;
-
-        /** */
-        public long l;
-
-        /** */
-        public float f;
-
-        /** */
-        public double d;
-
-        /** */
-        public char c;
-
-        /** */
-        public boolean z;
-
-        /** */
-        public String str;
-
-        /** */
-        public UUID uuid;
-
-        /** */
-        public Date date;
-
-        /** */
-        public Timestamp ts;
-
-        /** */
-        public byte[] bArr;
-
-        /** */
-        public short[] sArr;
-
-        /** */
-        public int[] iArr;
-
-        /** */
-        public long[] lArr;
-
-        /** */
-        public float[] fArr;
-
-        /** */
-        public double[] dArr;
-
-        /** */
-        public char[] cArr;
-
-        /** */
-        public boolean[] zArr;
-
-        /** */
-        public BigDecimal[] bdArr;
-
-        /** */
-        public String[] strArr;
-
-        /** */
-        public UUID[] uuidArr;
-
-        /** */
-        public Date[] dateArr;
-
-        /** */
-        public Timestamp[] tsArr;
-
-        /** */
-        public TestObjectEnum anEnum;
-
-        /** */
-        public TestObjectEnum[] enumArr;
-
-        /** */
-        public Map.Entry entry;
-
-        /**
-         * @return Array.
-         */
-        private byte[] serialize() {
-            ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
-
-            try {
-                ObjectOutput out = new ObjectOutputStream(byteOut);
-
-                out.writeObject(this);
-
-                out.close();
-            }
-            catch (IOException e) {
-                Throwables.propagate(e);
-            }
-
-            return byteOut.toByteArray();
-        }
-
-        /**
-         *
-         */
-        public void setDefaultData() {
-            b_ = 11;
-            s_ = 22;
-            i_ = 33;
-            l_ = 44L;
-            f_ = 55f;
-            d_ = 66d;
-            c_ = 'e';
-            z_ = true;
-
-            b = 1;
-            s = 2;
-            i = 3;
-            l = 4;
-            f = 5;
-            d = 6;
-            c = 7;
-            z = true;
-
-            str = "abc";
-            uuid = new UUID(1, 1);
-            date = new Date(1000000);
-            ts = new Timestamp(100020003);
-
-            bArr = new byte[] {1, 2, 3};
-            sArr = new short[] {1, 2, 3};
-            iArr = new int[] {1, 2, 3};
-            lArr = new long[] {1, 2, 3};
-            fArr = new float[] {1, 2, 3};
-            dArr = new double[] {1, 2, 3};
-            cArr = new char[] {1, 2, 3};
-            zArr = new boolean[] {true, false};
-
-            strArr = new String[] {"abc", "ab", "a"};
-            uuidArr = new UUID[] {new UUID(1, 1), new UUID(2, 2)};
-            bdArr = new BigDecimal[] {new BigDecimal(1000), BigDecimal.TEN};
-            dateArr = new Date[] {new Date(1000000), new Date(200000)};
-            tsArr = new Timestamp[] {new Timestamp(100020003), new Timestamp(200030004)};
-
-            anEnum = TestObjectEnum.A;
-
-            enumArr = new TestObjectEnum[] {TestObjectEnum.B};
-
-            entry = new GridMapEntry<>(1, "a");
-        }
-    }
-
-    /**
-     *
-     */
-    public enum TestObjectEnum {
-        A, B, C
-    }
-
-    /**
-     *
-     */
-    public static class Address implements Serializable {
-        /** SUID. */
-        private static final long serialVersionUID = 0L;
-
-        /** City. */
-        public String city;
-
-        /** Street. */
-        public String street;
-
-        /** Street number. */
-        public int streetNumber;
-
-        /** Flat number. */
-        public int flatNumber;
-
-        /**
-         * Default constructor.
-         */
-        public Address() {
-            // No-op.
-        }
-
-        /**
-         * Constructor.
-         *
-         * @param city City.
-         * @param street Street.
-         * @param streetNumber Street number.
-         * @param flatNumber Flat number.
-         */
-        public Address(String city, String street, int streetNumber, int flatNumber) {
-            this.city = city;
-            this.street = street;
-            this.streetNumber = streetNumber;
-            this.flatNumber = flatNumber;
-        }
-    }
-
-    /**
-     *
-     */
-    public static class Company implements Serializable {
-        /** SUID. */
-        private static final long serialVersionUID = 0L;
-
-        /** ID. */
-        public int id;
-
-        /** Name. */
-        public String name;
-
-        /** Size. */
-        public int size;
-
-        /** Address. */
-        public Address address;
-
-        /** Occupation. */
-        public String occupation;
-
-        /**
-         * Default constructor.
-         */
-        public Company() {
-            // No-op.
-        }
-
-        /**
-         * Constructor.
-         *
-         * @param id ID.
-         * @param name Name.
-         * @param size Size.
-         * @param address Address.
-         * @param occupation Occupation.
-         */
-        public Company(int id, String name, int size, Address address, String occupation) {
-            this.id = id;
-            this.name = name;
-            this.size = size;
-            this.address = address;
-            this.occupation = occupation;
-        }
-    }
-
-    /**
-     * Companies.
-     */
-    public static class Companies {
-        /** Companies. */
-        private List<Company> companies = new ArrayList<>();
-
-        /**
-         * @param idx Index.
-         * @return Company.
-         */
-        public Company get(int idx) {
-            return companies.get(idx);
-        }
-
-        /**
-         * @param company Company.
-         */
-        public void add(Company company) {
-            companies.add(company);
-        }
-
-        /**
-         * @return Size.
-         */
-        public int size() {
-            return companies.size();
-        }
-    }
-
-    /**
-     *
-     */
-    public static class Addresses implements Binarylizable {
-        /** */
-        private Map<String, Companies> companyByStreet = new TreeMap<>();
-
-        /**
-         * @param company Company.
-         */
-        public void addCompany(Company company) {
-            Companies list = companyByStreet.get(company.address.street);
-
-            if (list == null) {
-                list = new Companies();
-
-                companyByStreet.put(company.address.street, list);
-            }
-
-            list.add(company);
-        }
-
-        /**
-         * @return map
-         */
-        public Map<String, Companies> getCompanyByStreet() {
-            return companyByStreet;
-        }
-
-        /** {@inheritDoc} */
-        @Override public void writeBinary(BinaryWriter writer) throws BinaryObjectException {
-            writer.writeMap("companyByStreet", companyByStreet);
-        }
-
-        /** {@inheritDoc} */
-        @SuppressWarnings("unchecked")
-        @Override public void readBinary(BinaryReader reader) throws BinaryObjectException {
-            companyByStreet = reader.readMap("companyByStreet", new BinaryMapFactory<String, Companies>() {
-                @Override public Map<String, Companies> create(int size) {
-                    return new TreeMap<>();
-                }
-            });
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass1.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass1.java
new file mode 100644
index 0000000..b861a75
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass1.java
@@ -0,0 +1,28 @@
+/*
+ * 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.test;
+
+/**
+ */
+public class GridBinaryTestClass1 {
+    /**
+     */
+    private static class InnerClass {
+        // No-op.
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass2.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass2.java
new file mode 100644
index 0000000..fc5e88c
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridBinaryTestClass2.java
@@ -0,0 +1,24 @@
+/*
+ * 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.test;
+
+/**
+ */
+public class GridBinaryTestClass2 {
+    // No-op.
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass1.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass1.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass1.java
deleted file mode 100644
index 887134a..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass1.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * 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.test;
-
-/**
- */
-public class GridPortableTestClass1 {
-    /**
-     */
-    private static class InnerClass {
-        // No-op.
-    }
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass2.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass2.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass2.java
deleted file mode 100644
index 3c1c506..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/GridPortableTestClass2.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.test;
-
-/**
- */
-public class GridPortableTestClass2 {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridBinaryTestClass3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridBinaryTestClass3.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridBinaryTestClass3.java
new file mode 100644
index 0000000..72a5a1e
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridBinaryTestClass3.java
@@ -0,0 +1,24 @@
+/*
+ * 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.test.subpackage;
+
+/**
+ */
+public class GridBinaryTestClass3 {
+    // No-op.
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridPortableTestClass3.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridPortableTestClass3.java b/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridPortableTestClass3.java
deleted file mode 100644
index a04b586..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/binary/test/subpackage/GridPortableTestClass3.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * 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.test.subpackage;
-
-/**
- */
-public class GridPortableTestClass3 {
-    // No-op.
-}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
new file mode 100644
index 0000000..55f2da0
--- /dev/null
+++ b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStoreBinariesSelfTest.java
@@ -0,0 +1,66 @@
+/*
+ * 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.processors.cache.binary;
+
+import java.util.Map;
+import org.apache.ignite.binary.BinaryObject;
+
+/**
+ * Tests for cache store with binary.
+ */
+public class GridCacheBinaryStoreBinariesSelfTest extends GridCacheBinaryStoreAbstractSelfTest {
+    /** {@inheritDoc} */
+    @Override protected boolean keepPortableInStore() {
+        return true;
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void populateMap(Map<Object, Object> map, int... idxs) {
+        assert map != null;
+        assert idxs != null;
+
+        for (int idx : idxs)
+            map.put(portable(new Key(idx)), portable(new Value(idx)));
+    }
+
+    /** {@inheritDoc} */
+    @Override protected void checkMap(Map<Object, Object> map, int... idxs) {
+        assert map != null;
+        assert idxs != null;
+
+        assertEquals(idxs.length, map.size());
+
+        for (int idx : idxs) {
+            Object val = map.get(portable(new Key(idx)));
+
+            assertTrue(String.valueOf(val), val instanceof BinaryObject);
+
+            BinaryObject po = (BinaryObject)val;
+
+            assertEquals("Value", po.type().typeName());
+            assertEquals(new Integer(idx), po.field("idx"));
+        }
+    }
+
+    /**
+     * @param obj Object.
+     * @return Portable object.
+     */
+    private Object portable(Object obj) {
+        return grid().binary().toBinary(obj);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/469bf6d6/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStorePortablesSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStorePortablesSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStorePortablesSelfTest.java
deleted file mode 100644
index db15f08..0000000
--- a/modules/core/src/test/java/org/apache/ignite/internal/processors/cache/binary/GridCacheBinaryStorePortablesSelfTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.processors.cache.binary;
-
-import java.util.Map;
-import org.apache.ignite.binary.BinaryObject;
-
-/**
- * Tests for cache store with binary.
- */
-public class GridCacheBinaryStorePortablesSelfTest extends GridCacheBinaryStoreAbstractSelfTest {
-    /** {@inheritDoc} */
-    @Override protected boolean keepPortableInStore() {
-        return true;
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void populateMap(Map<Object, Object> map, int... idxs) {
-        assert map != null;
-        assert idxs != null;
-
-        for (int idx : idxs)
-            map.put(portable(new Key(idx)), portable(new Value(idx)));
-    }
-
-    /** {@inheritDoc} */
-    @Override protected void checkMap(Map<Object, Object> map, int... idxs) {
-        assert map != null;
-        assert idxs != null;
-
-        assertEquals(idxs.length, map.size());
-
-        for (int idx : idxs) {
-            Object val = map.get(portable(new Key(idx)));
-
-            assertTrue(String.valueOf(val), val instanceof BinaryObject);
-
-            BinaryObject po = (BinaryObject)val;
-
-            assertEquals("Value", po.type().typeName());
-            assertEquals(new Integer(idx), po.field("idx"));
-        }
-    }
-
-    /**
-     * @param obj Object.
-     * @return Portable object.
-     */
-    private Object portable(Object obj) {
-        return grid().binary().toBinary(obj);
-    }
-}


[3/3] ignite git commit: ignite-2065: rename "portable" classes to "binary" (in tests)

Posted by sb...@apache.org.
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-1.5
Commit: 469bf6d62f4ce6088ca99a2cb6823523958c3470
Parents: 71ad9ce
Author: ashutak <as...@gridgain.com>
Authored: Fri Dec 11 18:08:18 2015 +0300
Committer: ashutak <as...@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;
+    }
+}