### Question:
QueryServiceCsar extends CatalogQuery { @Override public String JSON2(boolean isArray, boolean isEmbed) { Map<String, String> valueMap = new HashMap<>(); put(valueMap, "ARTIFACT_UUID", null == toscaCsar ? null : toscaCsar.getArtifactUUID()); put(valueMap, "NAME", null == toscaCsar ? null : toscaCsar.getName()); put(valueMap, "VERSION", null == toscaCsar ? null : toscaCsar.getVersion()); put(valueMap, "ARTIFACT_CHECK_SUM", null == toscaCsar ? null : toscaCsar.getArtifactChecksum()); put(valueMap, "URL", null == toscaCsar ? null : toscaCsar.getUrl()); put(valueMap, "DESCRIPTION", null == toscaCsar ? null : toscaCsar.getDescription()); return this.setTemplate(TEMPLATE, valueMap); } QueryServiceCsar(ToscaCsar toscaCsar); @Override String toString(); @Override String JSON2(boolean isArray, boolean isEmbed);  }### Answer:
@Test public void convertToJson_successful() { String jsonResult = testedObject.JSON2(true, true); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.artifactUUID")).contains(TOSCA_ARTIFACT_UUID); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.name")).contains(TOSCA_NAME); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.version")).contains(TOSCA_VERSION); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.artifactChecksum")) .contains(String.valueOf(TOSCA_ARTIFACT_CHECKSUM)); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.url")).contains(TOSCA_URL); assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.description")).contains(TOSCA_DESCRIPTION); }