### Question:
SkaffoldSyncMapTemplate implements JsonTemplate { @VisibleForTesting public static SkaffoldSyncMapTemplate from(String jsonString) throws IOException { return new ObjectMapper().readValue(jsonString, SkaffoldSyncMapTemplate.class); }  @VisibleForTesting static SkaffoldSyncMapTemplate from(String jsonString); void addGenerated(FileEntry layerEntry); void addDirect(FileEntry layerEntry); String getJsonString(); @VisibleForTesting List<FileTemplate> getGenerated(); @VisibleForTesting List<FileTemplate> getDirect();  }### Answer:
@Test public void testFrom_badPropertyName() throws IOException { try { SkaffoldSyncMapTemplate.from(FAIL_TEST_JSON_BAD_PROPERTY_NAME); Assert.fail(); } catch (UnrecognizedPropertyException ex) { Assert.assertTrue(ex.getMessage().contains("Unrecognized field \"jean-luc\"")); } }
@Test public void testFrom_missingField() throws IOException { try { SkaffoldSyncMapTemplate.from(FAIL_TEST_JSON_MISSING_FIELD); Assert.fail(); } catch (MismatchedInputException ex) { Assert.assertTrue(ex.getMessage().contains("Missing required creator property 'dest'")); } }
@Test public void testFrom_validEmpty() throws Exception { SkaffoldSyncMapTemplate.from(TEST_JSON_EMPTY_GENERATED); SkaffoldSyncMapTemplate.from(TEST_JSON_NO_GENERATED); }