### Question:
JsonTemplateMapper { public static <T extends JsonTemplate> List<T> readListOfJson( String jsonString, Class<T> templateClass) throws IOException { CollectionType listType = objectMapper.getTypeFactory().constructCollectionType(List.class, templateClass); return objectMapper.readValue(jsonString, listType); } private  JsonTemplateMapper(); static T readJsonFromFile(Path jsonFile, Class<T> templateClass); static T readJsonFromFileWithLock(
      Path jsonFile, Class<T> templateClass); static T readJson(InputStream jsonStream, Class<T> templateClass); static T readJson(String jsonString, Class<T> templateClass); static T readJson(byte[] jsonBytes, Class<T> templateClass); static List<T> readListOfJson(
      String jsonString, Class<T> templateClass); static String toUtf8String(JsonTemplate template); static String toUtf8String(List<? extends JsonTemplate> templates); static byte[] toByteArray(JsonTemplate template); static byte[] toByteArray(List<? extends JsonTemplate> templates); static void writeTo(JsonTemplate template, OutputStream out); static void writeTo(List<? extends JsonTemplate> templates, OutputStream out);  }### Answer:
@Test public void testReadListOfJson() throws IOException, URISyntaxException, DigestException { Path jsonFile = Paths.get(Resources.getResource("core/json/basic_list.json").toURI()); String jsonString = new String(Files.readAllBytes(jsonFile), StandardCharsets.UTF_8); List<TestJson> listofJsons = JsonTemplateMapper.readListOfJson(jsonString, TestJson.class); TestJson json1 = listofJsons.get(0); TestJson json2 = listofJsons.get(1); DescriptorDigest digest1 = DescriptorDigest.fromDigest( "sha256:91e0cae00b86c289b33fee303a807ae72dd9f0315c16b74e6ab0cdbe9d996c10"); DescriptorDigest digest2 = DescriptorDigest.fromDigest( "sha256:8c662931926fa990b41da3c9f42663a537ccd498130030f9149173a0493832ad"); Assert.assertEquals(1, json1.number); Assert.assertEquals(2, json2.number); Assert.assertEquals("text1", json1.text); Assert.assertEquals("text2", json2.text); Assert.assertEquals(digest1, json1.digest); Assert.assertEquals(digest2, json2.digest); Assert.assertEquals(10, json1.innerObject.number); Assert.assertEquals(20, json2.innerObject.number); Assert.assertEquals(2, json1.list.size()); Assert.assertTrue(json2.list.isEmpty()); }