@Test
public void testExecuteAsynchMapOfStringT2ReferenceAsynchronousActivityCallback() throws Exception {

	configuration.put("columnRange", configuration.objectNode().put("start", 0).put("end", 3));
	activity.configure(configuration);
	for (ActivityInputPort activityInputPort : activityFactory.getInputPorts(configuration)) {
		edits.getAddActivityInputPortEdit(activity, activityInputPort).doEdit();
	}
	for (ActivityOutputPort activityOutputPort : activityFactory.getOutputPorts(configuration)) {
		edits.getAddActivityOutputPortEdit(activity, activityOutputPort).doEdit();
	}
	Map<String, Class<?>> outputs = new HashMap<String, Class<?>>();
	outputs.put("A", String.class);
	outputs.put("B", String.class);
	outputs.put("C", String.class);
	outputs.put("D", String.class);
	Map<String, Object> results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
			(Object) "src/test/resources/test-spreadsheet.xls"), outputs);
	assertEquals(4, results.size());
	assertTrue(results.get("A") instanceof List<?>);
	assertEquals(15, ((List<?>) results.get("A")).size());
	results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
			(Object) "src/test/resources/test-spreadsheet.ods"), outputs);
	assertEquals(4, results.size());
	assertTrue(results.get("A") instanceof List<?>);
	assertEquals(15, ((List<?>) results.get("A")).size());
	results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
			(Object) "src/test/resources/test-spreadsheet.csv"), outputs);
	assertEquals(4, results.size());
	assertTrue(results.get("A") instanceof List<?>);
	assertEquals(15, ((List<?>) results.get("A")).size());
	// CSV output
	configuration.put("outputFormat", SpreadsheetOutputFormat.SINGLE_PORT.name());
	activity.configure(configuration);
	outputs = new HashMap<String, Class<?>>();
	outputs.put("output", String.class);
	results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
			(Object) "src/test/resources/test-spreadsheet.xls"), outputs);
	assertEquals(1, results.size());
	assertTrue(results.get("output") instanceof String);
	assertEquals(15, ((String) results.get("output")).split(System.getProperty("line.separator")).length);
	// TSV output
	configuration.put("csvDelimiter", "\t");
	activity.configure(configuration);
	results = ActivityInvoker.invokeAsyncActivity(activity, Collections.singletonMap("fileurl",
			(Object) "src/test/resources/test-spreadsheet.csv"), outputs);
	assertEquals(1, results.size());
	assertTrue(results.get("output") instanceof String);
	assertEquals(15, ((String) results.get("output")).split(System.getProperty("line.separator")).length);
}