@Test
public void setConfigAttributes_shouldSetConfigurationAsIsIfPluginIdIsBlank() throws CryptoException {
HashMap<Object, Object> imageMap = new HashMap<>();
imageMap.put("value", new GoCipher().encrypt("some-encrypted-value"));
imageMap.put("isSecure", "true");
HashMap<Object, Object> tagMap = new HashMap<>();
tagMap.put("value", "18.6.0");
tagMap.put("isSecure", "false");
HashMap<Object, Object> configurationMap1 = new HashMap<>();
configurationMap1.put("Image", imageMap);
configurationMap1.put("Tag", tagMap);
HashMap<String, Object> artifactPlan1 = new HashMap<>();
artifactPlan1.put("artifactTypeValue", "Pluggable Artifact");
artifactPlan1.put("id", "artifactId");
artifactPlan1.put("storeId", "storeId");
artifactPlan1.put("pluginId", "");
artifactPlan1.put("configuration", configurationMap1);
List<Map> artifactPlansList = new ArrayList<>();
artifactPlansList.add(artifactPlan1);
ArtifactConfigs artifactConfigs = new ArtifactConfigs();
artifactConfigs.setConfigAttributes(artifactPlansList);
assertThat(artifactConfigs.size(), is(1));
PluggableArtifactConfig artifactConfig = (PluggableArtifactConfig) artifactConfigs.get(0);
assertThat(artifactConfig.getArtifactType(), is(ArtifactType.external));
assertThat(artifactConfig.getId(), is("artifactId"));
assertThat(artifactConfig.getStoreId(), is("storeId"));
assertThat(artifactConfig.getConfiguration().getProperty("Image").getValue(), is("some-encrypted-value"));
assertThat(artifactConfig.getConfiguration().getProperty("Tag").getValue(), is("18.6.0"));
}