### Question:
DefaultToSoyDataConverter implements ToSoyDataConverter { @SuppressWarnings("unchecked") protected Map<String, ?> toSoyCompatibleMap(final Object obj) throws Exception { Object ret = toSoyCompatibleObjects(obj); if (!(ret instanceof Map)) { throw new IllegalArgumentException("Input should be a Map or POJO."); } return (Map<String, ?>) ret; } DefaultToSoyDataConverter(); void setIgnorablePropertiesMatcher(
			Matcher<PropertyDescriptor> ignorablePropertiesMatcher); @Override Optional<SoyMapData> toSoyMap(final Object model);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testToSoyCompatibleMapWhenNotMap() throws Exception { String test = "won't work"; objectToSoyDataConverter.toSoyCompatibleMap(test); }