Client { ConnectionState getState() { return state; } Client(final String url, final Options opts, final EventListener listener); void setToken(String token); void setName(String name); void setVersion(String version); void setConnectData(byte[] data); void connect(); void disconnect(); boolean close(long awaitMilliseconds); Subscription newSubscription(String channel, SubscriptionEventListener listener); Subscription getSubscription(String channel); void removeSubscription(Subscription sub); void send(byte[] data, CompletionCallback cb); void rpc(byte[] data, ReplyCallback<RPCResult> cb); void rpc(String method, byte[] data, ReplyCallback<RPCResult> cb); void publish(String channel, byte[] data, ReplyCallback<PublishResult> cb);  }
@Test public void testInitialization() { Client client = new Client("", new Options(), null); assertEquals(client.getState(), ConnectionState.NEW); }