### Question:
TranslateArrayTransformator extends TransformatorProcess { public void apply(String idProcess, ParameterTransformation parameterTransformation, ObjectNode jsonValue) { if (has(parameterTransformation.getKeyField(), jsonValue)) { JsonNode jsonNode = at(parameterTransformation.getKeyField(), jsonValue); if (jsonNode.isArray()) { for (final JsonNode arrayEntry : jsonNode) { put(jsonValue, StringUtils.lowerCase(parameterTransformation.getKeyField() + "-" + arrayEntry.asText()), "true"); } } } } TranslateArrayTransformator(); void apply(String idProcess, ParameterTransformation parameterTransformation, ObjectNode jsonValue);  }### Answer:
@Test public void should_Process_Ok() throws Exception { TranslateArrayTransformator translateArrayTransformator = new TranslateArrayTransformator(); String value = "{" + " \"tags\" : [\"One\", \"Two\", \"Three\"]" + "}"; ObjectNode jsonValue = JSONUtils.getInstance().parseObj(value); translateArrayTransformator.apply(null, ParameterTransformation.builder() .keyField("tags") .build(), jsonValue); assertThat(jsonValue.path("tags-one").asText()).isEqualTo("true"); assertThat(jsonValue.path("tags-two").asText()).isEqualTo("true"); assertThat(jsonValue.path("tags-three").asText()).isEqualTo("true"); }
@Test public void should_Process_Ko() throws Exception { TranslateArrayTransformator translateArrayTransformator = new TranslateArrayTransformator(); String value = "{" + " \"tags\" : [\"One\", \"Two\", \"Three\"]" + "}"; ObjectNode jsonValue = JSONUtils.getInstance().parseObj(value); translateArrayTransformator.apply(null, ParameterTransformation.builder() .keyField("missing") .build(), jsonValue); assertThat(jsonValue.path("tags-one").isMissingNode()).isTrue(); assertThat(jsonValue.path("tags-two").isMissingNode()).isTrue(); assertThat(jsonValue.path("tags-three").isMissingNode()).isTrue(); }