@Override
    public InternalSerializationService build() {
        initVersions();
        if (config != null) {
            addConfigDataSerializableFactories(dataSerializableFactories, config, classLoader);
            addConfigPortableFactories(portableFactories, config, classLoader);
            classDefinitions.addAll(config.getClassDefinitions());
        }

        InputOutputFactory inputOutputFactory = createInputOutputFactory();
        InternalSerializationService ss = createSerializationService(inputOutputFactory, notActiveExceptionSupplier);

        registerSerializerHooks(ss);

        if (config != null) {
            if (config.getGlobalSerializerConfig() != null) {
                GlobalSerializerConfig globalSerializerConfig = config.getGlobalSerializerConfig();
                Serializer serializer = globalSerializerConfig.getImplementation();
                if (serializer == null) {
                    try {
                        serializer = ClassLoaderUtil.newInstance(classLoader, globalSerializerConfig.getClassName());
                    } catch (Exception e) {
                        throw new HazelcastSerializationException(e);
                    }
                }

                if (serializer instanceof HazelcastInstanceAware aware) {
                    aware.setHazelcastInstance(hazelcastInstance);
                }

                ((AbstractSerializationService) ss)
                        .registerGlobal(serializer, globalSerializerConfig.isOverrideJavaSerialization());
            }
        }
        return ss;
    }
@Test
    public void test_byteOrderIsOverridden_whenBigEndian() {
        System.setProperty(BYTE_ORDER_OVERRRIDE_PROPERTY, "BIG_ENDIAN");
        try {
            InternalSerializationService serializationService = getSerializationServiceBuilder().build();
            assertEquals(ByteOrder.BIG_ENDIAN, serializationService.getByteOrder());
        } finally {
            System.clearProperty(BYTE_ORDER_OVERRRIDE_PROPERTY);
        }
    }