@Test(groups = "slow")
public void testSend() throws Exception
{

    // test send before server's initialized. hope for timeout failure
    logger.info("sending");
    sender.send(eventsFile, failureCallbackHandler);
    Thread.sleep((long) 100); // 100 is long enough for it to timeout
    // initialize server and test again.
    server.start();
    logger.info("Started server");
    logger.info("sending");
    sender.send(eventsFile, successCallbackHandler);
    Thread.sleep((long) 500);
    server.stop();
}