public void testSendEvent() {
String eventName = "TestEventName";
cmdLineUtility.run(("--url http://localhost:9000"
+ " --operation --sendEvent --eventName " + eventName).split(" "));
MethodCallDetails methodCallDetails = client.getLastMethodCallDetails();
assertEquals("sendEvent", methodCallDetails.getMethodName());
assertEquals(eventName, methodCallDetails.getArgs().get(0));
OptionPropertyRegister.clearRegister();
cmdLineUtility.run(("--url http://localhost:9000"
+ " --operation --sendEvent --eventName " + eventName
+ " --metaData --key Filename data.dat --key NominalDate 2001-02-20").split(" "));
methodCallDetails = client.getLastMethodCallDetails();
assertEquals("sendEvent", methodCallDetails.getMethodName());
assertEquals(eventName, methodCallDetails.getArgs().get(0));
Metadata m = new Metadata();
m.addMetadata("Filename", Lists.newArrayList("data.dat"));
m.addMetadata("NominalDate", Lists.newArrayList("2001-02-20"));
assertEquals(m, methodCallDetails.getArgs().get(1));
}