public void TestClassDefinitionConfigWithErrors()
        {
            var serializationConfig = new SerializationConfig();

            serializationConfig.AddPortableFactory(TestSerializationConstants.PORTABLE_FACTORY_ID,
                                                   new TestPortableFactory());
            serializationConfig.SetPortableVersion(1);
            serializationConfig.AddClassDefinition(
                new ClassDefinitionBuilder(TestSerializationConstants.PORTABLE_FACTORY_ID,
                                           TestSerializationConstants.RAW_DATA_PORTABLE)
                .AddLongField("l")
                .AddCharArrayField("c")
                .AddPortableField("p", CreateNamedPortableClassDefinition())
                .Build());

            try
            {
                new SerializationServiceBuilder().SetConfig(serializationConfig).Build();
                Assert.Fail("Should throw HazelcastSerializationException!");
            }
            catch (HazelcastSerializationException)
            {
            }

            new SerializationServiceBuilder().SetConfig(serializationConfig).SetCheckClassDefErrors(false).Build();

            // -- OR --

            serializationConfig.SetCheckClassDefErrors(false);
            new SerializationServiceBuilder().SetConfig(serializationConfig).Build();
        }