public void testStateListener() throws Exception {
final AtomicBoolean started = new AtomicBoolean();
final AtomicBoolean stopped = new AtomicBoolean();
final AtomicInteger connectedCount = new AtomicInteger(0);
HSClientStateListener listener = new HSClientStateListener() {
public void onStarted(HSClient client) {
started.set(true);
}