public void queryTest() throws IOException, InterruptedException, ServerError {
final Server server = new EchoServer();
RiemannClient client = null;
try {
client = RiemannClient.tcp(server.start());
client.connect();
for (int i = 0; i < 10; i++) {
final List<Event> events = client.query("hi");
assertEquals(0, events.size());
final Msg m = server.received.poll();
assertEquals("hi", m.getQuery().getString());