res.setDataType(SampleResult.TEXT);
res.setContentType("text/plain"); // $NON-NLS-1$
res.sampleStart();
try {
MongoDB mongoDB = MongoSourceElement.getMongoDB(getSource());
MongoScriptRunner runner = new MongoScriptRunner();
DB db = mongoDB.getDB(getDatabase(), getUsername(), getPassword());
res.latencyEnd();
Object result = runner.evaluate(db, data);
EvalResultHandler handler = new EvalResultHandler();
String resultAsString = handler.handle(result);
res.setResponseData(resultAsString.getBytes());