public Mono<CosmosContainerResponse> createContainer(
            final String containerId, final String containerPartitionKeyPath, final ThroughputProperties throughputProperties,
            final IndexingPolicy indexingPolicy) {
        CosmosDbUtils.validateIfParameterIsNotEmpty(containerId, PARAM_CONTAINER_ID);
        CosmosDbUtils.validateIfParameterIsNotEmpty(containerPartitionKeyPath, PARAM_CONTAINER_PARTITION_KEY_PATH);

        // containerPartitionKeyPath it needs to start with /
        final String enhancedContainerPartitionKeyPath;
        if (!containerPartitionKeyPath.startsWith("/")) {
            enhancedContainerPartitionKeyPath = "/" + containerPartitionKeyPath;
        } else {
            enhancedContainerPartitionKeyPath = containerPartitionKeyPath;
        }

        if (ObjectHelper.isNotEmpty(indexingPolicy)) {
            CosmosContainerProperties cosmosProp
                    = new CosmosContainerProperties(containerId, enhancedContainerPartitionKeyPath);
            cosmosProp.setIndexingPolicy(indexingPolicy);

            return applyToDatabase(database -> database.createContainerIfNotExists(cosmosProp,
                    throughputProperties));
        } else {
            return applyToDatabase(database -> database.createContainerIfNotExists(containerId, containerPartitionKeyPath,
                    throughputProperties));
        }
    }
@Test
    void testCreateContainer() {
        final CosmosAsyncDatabase database = mock(CosmosAsyncDatabase.class);
        final CosmosContainerResponse containerResponse = mock(CosmosContainerResponse.class);

        when(containerResponse.getProperties()).thenReturn(new CosmosContainerProperties("test-container", "/path"));
        when(database.createContainerIfNotExists(any(), any(), any())).thenReturn(Mono.just(containerResponse));

        final CosmosDbDatabaseOperations databaseOperations = new CosmosDbDatabaseOperations(Mono.just(database));

        // assert params
        CosmosDbTestUtils
                .assertIllegalArgumentException(() -> databaseOperations.createContainer(null, null, null, null));
        CosmosDbTestUtils
                .assertIllegalArgumentException(() -> databaseOperations.createContainer("", null, null, null));
        CosmosDbTestUtils.assertIllegalArgumentException(() -> databaseOperations.createContainer("", "", null, null));
        CosmosDbTestUtils
                .assertIllegalArgumentException(() -> databaseOperations.createContainer("test", "", null, null));
        CosmosDbTestUtils
                .assertIllegalArgumentException(() -> databaseOperations.createContainer("", "test", null, null));

        // assert key path
        final CosmosContainerResponse returnedContainerResponseFirstCase
                = databaseOperations.createContainer("test-container", "path", null, null).block();
        final CosmosContainerResponse returnedContainerResponseSecondCase
                = databaseOperations.createContainer("test-container", "/path", null, null).block();

        assertNotNull(returnedContainerResponseFirstCase);
        assertNotNull(returnedContainerResponseSecondCase);
        assertEquals("test-container", returnedContainerResponseFirstCase.getProperties().getId());
        assertEquals("test-container", returnedContainerResponseSecondCase.getProperties().getId());
        assertEquals("/path", returnedContainerResponseFirstCase.getProperties().getPartitionKeyDefinition().getPaths().get(0));
        assertEquals("/path",
                returnedContainerResponseSecondCase.getProperties().getPartitionKeyDefinition().getPaths().get(0));
    }