### Question:
Template { public void read(final Iterable<? extends CharSequence> json, final Object destination, final boolean skipNulls) throws IOException { final FormReader r = new FormReader(new LineReader(root.standard, json, null, null), depth, skipNulls, specialized); r.read((String[]) null); r.writeToMetadata(root.standard, destination); } private  Template(final MetadataStandard standard, final Iterable<String> template, final Map<String,String> sharedLines,
            final Map<String,String[]> sharedPaths, final int depth);  Template(final MetadataStandard standard, final Iterable<String> template,
            final Map<Class<?>, Class<?>> specialized); static Set<String> getAvailableNames(); static Template getInstance(final String name); void write(final Object metadata, final Appendable out, final boolean prune); void read(final Iterable<? extends CharSequence> json, final Object destination, final boolean skipNulls); void read(final RootObj json, final Object destination, final boolean skipNulls); static void addTemplate(final String name, Template t);  }### Answer:
@Test public void testRead() throws IOException { final DefaultMetadata expected = createMetadata(); ((List<?>) expected.getIdentificationInfo().iterator().next() .getDescriptiveKeywords().iterator().next() .getKeywords()).subList(1, 3).clear(); ((DefaultGeographicBoundingBox) expected.getIdentificationInfo().iterator().next() .getExtents().iterator().next() .getGeographicElements().iterator().next()).setInclusion(null); final DefaultMetadata metadata = new DefaultMetadata(); Template.getInstance("profile_inspire_vector").read(readAllLines("vector_prune.json"), metadata, true); assertTrue(expected.equals(metadata, ComparisonMode.DEBUG)); }
@Test public void testGeographicElements() throws IOException { final List<String> lines = readAllLines("profile_dataset.json"); final Template template = new Template(MetadataStandard.ISO_19115, lines, null); final DefaultMetadata metadata = new DefaultMetadata(); template.read(lines, metadata, false); assertTrue(metadata.isEmpty()); }