@SuppressWarnings("checkstyle:NestedIfDepth")
    @Nullable
    public PartitioningStrategy getPartitioningStrategy(
            String mapName,
            PartitioningStrategyConfig config,
            final List<PartitioningAttributeConfig> attributeConfigs
    ) {
        if (attributeConfigs != null && !attributeConfigs.isEmpty()) {
            return cache.computeIfAbsent(mapName, k -> createAttributePartitionStrategy(attributeConfigs));
        }
        if (config != null && config.getPartitioningStrategy() != null) {
            return config.getPartitioningStrategy();
        }
        if (config != null && config.getPartitioningStrategyClass() != null) {
            PartitioningStrategy<?> strategy = cache.get(mapName);
            if (strategy != null) {
                return strategy;
            }
            try {
                // We don't use computeIfAbsent intentionally so that the map isn't blocked if the instantiation takes a
                // long time - it's user code
                strategy = ClassLoaderUtil.newInstance(configClassLoader, config.getPartitioningStrategyClass());
            } catch (Exception e) {
                throw ExceptionUtil.rethrow(e);
            }
            cache.putIfAbsent(mapName, strategy);
            return strategy;
        }
        return null;
    }
@Test
    public void whenConfigNull_getPartitioningStrategy_returnsNull() {
        PartitioningStrategy partitioningStrategy = partitioningStrategyFactory.getPartitioningStrategy(mapName, null, null);
        assertNull(partitioningStrategy);
    }