### Question:
ModelAttributeScriptHelper { public Date parsedate(String pattern, String nulldate) { String text = value != null ? value.toString() : ""; if (isNotBlank(text) && !text.equals(nulldate)) { return parseDateFromText(pattern, text); } else { return null; } } ModelAttributeScriptHelper(Message message, ComponentContext context, ModelAttrib attribute, ModelEntity entity, RelationalModel model,
            EntityData data, Object value);  ModelAttributeScriptHelper(ComponentContext context, ModelAttrib attribute, ModelEntity entity, RelationalModel model); void setMessage(Message message); void setData(EntityData data); void setValue(Object value); Object nullvalue(); void mapChangeType(Object add, Object chg, Object del); @Deprecated Integer integer(); Integer parseInt(); Long parseLong(); Double parseDouble(); BigDecimal parseBigDecimal(); BigDecimal parseBigDecimal(Object value); Number biggest(Number... numbers); Serializable subtract(String startingValueAttributeName, String... attributeNames); Serializable subtract(String startingValueAttributeName, Number... numbers); Serializable add(String... attributeNames); Serializable map(Map<Object, Serializable> lookup, Serializable defaultValue); Serializable flowParameter(String parameterName); Serializable messageParameter(String parameterName); String abbreviate(int maxwidth); String left(int length); String right(int length); String rpad(String padChar, int length); String lpad(String padChar, int length); String substr(int start, int end); String lower(); String upper(); String trim(); String format(String spec); String replace(String searchString, String replacement); Date daysFromNow(int days); Date currentdate(); String currentdate(String format); RemoveAttribute remove(); Date parsedate(String pattern, String nulldate); Date parsedate(String pattern); String formatdate(String pattern); String parseAndFormatDate(String parsePattern, String formatPattern); Object nvl(Object substituteForNull); String stringConstant(String value); String capitalize(); Long nextLongValueInMessage(String... attributeNamesToLookAt); Long sequence(long seed_value, int incrementValue, String breakAttributeName); Object getAttributeValueByName(String attributeName); static String[] getSignatures(); static Object eval(Message message, ComponentContext context, ModelAttrib attribute, Object value, RelationalModel model, ModelEntity entity,
            EntityData data, String expression); static final RemoveAttribute REMOVE_ATTRIBUTE; }### Answer:
@Test public void testParsedateWithNullValue() { ModelAttributeScriptHelper helper = new ModelAttributeScriptHelper(null, null, null, null, null, null, "0000-00-01"); assertNull(helper.parsedate("yyyy-MM-dd", "0000-00-01")); helper = new ModelAttributeScriptHelper(null, null, null, null, null, null, "2015-01-01"); assertNotNull(helper.parsedate("yyyy-MM-dd", "0000-00-01")); }