@Override
    public Object initialize(Object obj) {
        Object object = obj;
        if (object instanceof HazelcastInstanceAware aware) {
            aware.setHazelcastInstance(instance);
        }
        if (object instanceof SerializationServiceAware aware) {
            aware.setSerializationService(instance.getSerializationService());
        }

        if (hasExternalContext) {
            object = externalContext.initialize(object);
        }
        return object;
    }
@Test
    public void testInitialize() {
        DependencyInjectionUserClass initializedUserClass = (DependencyInjectionUserClass) serializationService.getManagedContext().initialize(userClass);

        assertEquals(client, initializedUserClass.hazelcastInstance);
        assertNull("The client doesn't inject the Node", initializedUserClass.node);
        assertEquals(serializationService, initializedUserClass.serializationService);
        assertTrue(userContext.wasCalled);
    }