static String determineImagePullPolicy(ImagePullPolicy imagePullPolicy, String containerImage)  {
        if (imagePullPolicy != null)   {
            // A specific image pull policy was requested => we will honor it
            return imagePullPolicy.toString();
        } else if (containerImage.toLowerCase(Locale.ENGLISH).contains(":latest"))  {
            // No policy was requested => we use Always for latest images
            return ImagePullPolicy.ALWAYS.toString();
        } else {
            // No policy was requested => we use IfNotPresent for latest images
            return ImagePullPolicy.IFNOTPRESENT.toString();
        }
    }
@Test
    public void testDetermineImagePullPolicy()  {
        assertThat(ContainerUtils.determineImagePullPolicy(ImagePullPolicy.ALWAYS, "docker.io/repo/image:tag"), is(ImagePullPolicy.ALWAYS.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(ImagePullPolicy.IFNOTPRESENT, "docker.io/repo/image:tag"), is(ImagePullPolicy.IFNOTPRESENT.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(ImagePullPolicy.IFNOTPRESENT, "docker.io/repo/image:latest"), is(ImagePullPolicy.IFNOTPRESENT.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(ImagePullPolicy.NEVER, "docker.io/repo/image:tag"), is(ImagePullPolicy.NEVER.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(ImagePullPolicy.NEVER, "docker.io/repo/image:latest-kafka-2.7.0"), is(ImagePullPolicy.NEVER.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(null, "docker.io/repo/image:latest"), is(ImagePullPolicy.ALWAYS.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(null, "docker.io/repo/image:not-so-latest"), is(ImagePullPolicy.IFNOTPRESENT.toString()));
        assertThat(ContainerUtils.determineImagePullPolicy(null, "docker.io/repo/image:latest-kafka-2.7.0"), is(ImagePullPolicy.ALWAYS.toString()));
    }