### Question:
QueryServiceArtifact extends CatalogQuery { @Override public String JSON2(boolean isArray, boolean isEmbed) { StringBuilder sb = new StringBuilder(); if (!isEmbed && isArray) sb.append("{ "); if (isArray) sb.append("\"serviceArtifact\": ["); Map<String, String> valueMap = new HashMap<>(); String sep = ""; boolean first = true; for (ServiceArtifact o : serviceArtifactList) { if (first) sb.append("\n"); first = false; boolean vrNull = o == null; put(valueMap, "ARTIFACT_UUID", vrNull ? null : o.getArtifactUUID()); put(valueMap, "TYPE", vrNull ? null : o.getType()); put(valueMap, "NAME", vrNull ? null : o.getName()); put(valueMap, "VERSION", vrNull ? null : o.getVersion()); put(valueMap, "DESCRIPTION", vrNull ? null : o.getDescription()); put(valueMap, "CONTENT", vrNull ? null : o.getContent()); put(valueMap, "CHECKSUM", vrNull ? null : o.getChecksum()); sb.append(sep).append(this.setTemplate(TEMPLATE, valueMap)); sep = ",\n"; } if (!first) sb.append("\n"); if (isArray) sb.append("]"); if (!isEmbed && isArray) sb.append("}"); return sb.toString(); } QueryServiceArtifact();  QueryServiceArtifact(List<ServiceArtifact> alist); List<ServiceArtifact> getServiceArtifact(); void setServiceArtifact(List<ServiceArtifact> a); @Override String toString(); @Override String JSON2(boolean isArray, boolean isEmbed);  }### Answer:
@Test public void ServiceArtifactTest() { QueryServiceArtifact queryServiceArtifact = new QueryServiceArtifact(createList()); String jsonResult = queryServiceArtifact.JSON2(true, false); Assertions.assertThat(JsonPathUtil.getInstance().locateResult(jsonResult, "$.serviceArtifact[0].name").get()) .isEqualTo("eMBB.zip"); }