public CosmosDbContainerOperations createContainerIfNotExistAndGetContainerOperations(
            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);

        return new CosmosDbContainerOperations(
                getAndCreateContainerIfNotExist(containerId, containerPartitionKeyPath, true, throughputProperties,
                        indexingPolicy));
    }
@Test
    void createContainerIfNotExistAndGetContainerOperations() {
        final CosmosAsyncDatabase database = mock(CosmosAsyncDatabase.class);
        final CosmosAsyncContainer containerNew = mock(CosmosAsyncContainer.class);
        final CosmosAsyncContainer containerExisting = mock(CosmosAsyncContainer.class);

        when(containerNew.getId()).thenReturn("container-new");
        when(containerExisting.getId()).thenReturn("container-existing");
        when(database.getContainer("container-new")).thenReturn(containerNew);
        when(database.getContainer("container-existing")).thenReturn(containerExisting);
        when(database.createContainerIfNotExists(any(), any(), any()))
                .thenReturn(Mono.just(mock(CosmosContainerResponse.class)));

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

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

        assertEquals("container-new", databaseOperations
                .createContainerIfNotExistAndGetContainerOperations("container-new", "/path", null, null).getContainerId()
                .block());
        assertEquals("container-existing",
                databaseOperations.getContainerOperations("container-existing").getContainerId().block());
    }