@Test
  public void shouldWakeUpOnIdle() throws Exception {
    CountDownLatch latch = new CountDownLatch(3);
    MemcachedConnection connection = new InstrumentedConnection(
      latch,
      1024,
      new BinaryConnectionFactory(),
      Arrays.asList(new InetSocketAddress(11211)),
      Collections.<ConnectionObserver>emptyList(),
      FailureMode.Redistribute,
      new BinaryOperationFactory()
    );

    assertTrue(latch.await(5, TimeUnit.SECONDS));
  }
Verifies the functionality of the {@link MemcachedConnection} that the
selector gets woken up automatically if idle.
src/test/java/net/spy/memcached/WokenUpOnIdleTest.java