public static PartitionAwareOperationFactory extractPartitionAware(OperationFactory operationFactory) {
        if (operationFactory instanceof PartitionAwareOperationFactory factory) {
            return factory;
        }

        if (operationFactory instanceof OperationFactoryWrapper wrapper) {
            OperationFactory unwrapped = wrapper.getOperationFactory();
            if (unwrapped instanceof PartitionAwareOperationFactory factory) {
                return factory;
            }
        }

        return null;
    }
@Test
    public void returns_null_when_supplied_factory_is_not_partition_aware() {
        assertNull(extractPartitionAware(new RawOpFactory()));
    }