assertEquals("abc", client.invoke("abc"));
// Add connection listener.
Map metadata = new HashMap();
metadata.put(ServerInvoker.TIMEOUT, ConnectionValidator.DEFAULT_PING_TIMEOUT + "1");
ConnectionListener listener = new TestConnectionListener();
client.addConnectionListener(listener, metadata);
// Test pingPeriod.
Field field = Client.class.getDeclaredField("connectionValidator");
field.setAccessible(true);