private void checkExpansion(String source, String expected) throws Exception {
DSLTokenizedMappingFile file = new DSLTokenizedMappingFile();
String dsl = "[when]There is an TestObject=TestObject()\n"
+ "[when]-startDate is before {date}=startDate>DateUtils.parseDate(\"{date}\")\n"
+ "[when]-endDate is after {date}=endDate>DateUtils.parseDate(\"{date}\")";
file.parseAndLoad( new StringReader( dsl ) );
assertEquals( 0,
file.getErrors().size() );
DefaultExpander ex = new DefaultExpander();
ex.addDSLMapping( file.getMapping() );