### Question:
DefaultToSoyDataConverter implements ToSoyDataConverter { @Override public Optional<SoyMapData> toSoyMap(final Object model) throws Exception { if (model == null) { return Optional.absent(); } return Optional.fromNullable(objectToSoyDataMap(model)); } DefaultToSoyDataConverter(); void setIgnorablePropertiesMatcher(
			Matcher<PropertyDescriptor> ignorablePropertiesMatcher); @Override Optional<SoyMapData> toSoyMap(final Object model);  }### Answer:
@Test public void testToSoyMapWhenNoModel() throws Exception { Optional<SoyMapData> soyData = objectToSoyDataConverter.toSoyMap(null); assertFalse(soyData.isPresent()); }
@Test public void testToSoyMapWhenModelIsPresent() throws Exception { Map<String, String> model = new HashMap<String, String>(); model.put(key, keyValue); Optional<SoyMapData> soyData = objectToSoyDataConverter.toSoyMap(model); assertTrue(soyData.isPresent()); SoyMapData data = soyData.get(); assertEquals(keyValue, data.get(key).stringValue()); }