KafkaConnectS2ICluster extends KafkaConnectCluster { public ImageStream generateTargetImageStream() { ImageStream imageStream = new ImageStreamBuilder() .withNewMetadata() .withName(KafkaConnectS2IResources.targetImageStreamName(cluster)) .withNamespace(namespace) .withLabels(getLabelsWithStrimziName(name, null).toMap()) .withOwnerReferences(createOwnerReference()) .endMetadata() .withNewSpec() .withLookupPolicy(new ImageLookupPolicyBuilder().withLocal(true).build()) .endSpec() .build(); return imageStream; } private  KafkaConnectS2ICluster(HasMetadata resource); static KafkaConnectS2ICluster fromCrd(KafkaConnectS2I kafkaConnectS2I, KafkaVersion.Lookup versions); DeploymentConfig generateDeploymentConfig(Map<String, String> annotations, boolean isOpenShift, ImagePullPolicy imagePullPolicy,
                                                     List<LocalObjectReference> imagePullSecrets); ImageStream generateSourceImageStream(); ImageStream generateTargetImageStream(); BuildConfig generateBuildConfig(); boolean isInsecureSourceRepository(); void setInsecureSourceRepository(boolean insecureSourceRepository); void setBuildResourceRequirements(ResourceRequirements buildRequirements);  }
@Test public void testGenerateTargetImageStream() { ImageStream is = kc.generateTargetImageStream(); assertThat(is.getMetadata().getName(), is(KafkaConnectS2IResources.targetImageStreamName(cluster))); assertThat(is.getMetadata().getNamespace(), is(namespace)); assertThat(is.getMetadata().getLabels(), is(expectedLabels(KafkaConnectS2IResources.targetImageStreamName(cluster)))); assertThat(is.getSpec().getLookupPolicy().getLocal(), is(true)); checkOwnerReference(kc.createOwnerReference(), is); }