public void testMany () throws IOException {
		Server server = new Server();
		Kryo serverKryo = server.getKryo();
		register(serverKryo);

		startEndPoint(server);
		server.bind(tcpPort);

		final TestObjectImpl serverTestObject = new TestObjectImpl(4321);

		final ObjectSpace serverObjectSpace = new ObjectSpace();
		serverObjectSpace.register(42, serverTestObject);

		server.addListener(new Listener() {
			public void connected (final Connection connection) {
				serverObjectSpace.addConnection(connection);
			}

			public void received (Connection connection, Object object) {
				if (object instanceof MessageWithTestObject) {
					assertEquals(256 + 512 + 1024, serverTestObject.moos);
					stopEndPoints(2000);
				}
			}
		});

		// ----

		Client client = new Client();
		register(client.getKryo());

		startEndPoint(client);
		client.addListener(new Listener() {
			public void connected (final Connection connection) {
				new Thread() {
					public void run () {
						TestObject test = ObjectSpace.getRemoteObject(connection, 42, TestObject.class);
						test.other();
						// Timeout on purpose.
						try {
							((RemoteObject)test).setResponseTimeout(200);
							test.slow();
							fail();
						} catch (TimeoutException ignored) {
						}
						try {
							Thread.sleep(300);
						} catch (InterruptedException ex) {
						}
						((RemoteObject)test).setResponseTimeout(3000);
						for (int i = 0; i < 256; i++)
							assertEquals(4321f, (float)test.other());
						for (int i = 0; i < 256; i++)
							test.moo();
						for (int i = 0; i < 256; i++)
							test.moo("" + i);
						for (int i = 0; i < 256; i++)
							test.moo("" + i, 0);
						connection.sendTCP(new MessageWithTestObject());
					}
				}.start();
			}
		});
		client.connect(5000, host, tcpPort);

		waitForThreads();
	}