}
buffer.append("void ");//$NON-NLS-1$
buffer.append(testName);
buffer.append("() throws Exception");//$NON-NLS-1$
EndpointMaps endpointMaps = fPage2.getCheckedEndpointMaps();
appendTestMethodBody(buffer, type.getCompilationUnit(), endpointMaps);
type.createMethod(buffer.toString(), null, false, null);
// now lets create the test fields
// TODO configure how many bodies to use
if (endpointMaps.getInputEndpoint() != null) {
type.createField(delimiter +
"// TODO Create test message bodies that work for the route(s) being tested" + delimiter +
"// Expected message bodies" + delimiter
+ "protected Object[] expectedBodies = {\"<something id='1'>expectedBody1</something>\","
+ delimiter + " \"<something id='2'>expectedBody2</something>\" };", null, false, null);
}
Map<String, String> inputEndpoints = endpointMaps.getInputEndpoints();
Map<String, String> outputEndpoints = endpointMaps.getOutputEndpoints();
int idx = 0;
for (Map.Entry<String, String> entry : inputEndpoints.entrySet()) {
appendProducerTemplateField(type, entry.getKey(), entry.getValue(), idx++, endpointMaps);
}