public <W extends T> void add(Class<W> clazz, T server) {
    Preconditions.checkNotNull(clazz, "clazz");
    Preconditions.checkNotNull(server, "server");
    Preconditions.checkArgument(clazz.isInstance(server),
        "Server %s is not an instance of %s", server.getClass(), clazz.getName());
    try (LockResource r = new LockResource(mLock)) {
      mRegistry.put(clazz, server);
    }
  }
@Test
  public void cycle() {
    Registry<TestServer, Void> registry = new Registry<>();
    registry.add(ServerA.class, new ServerA());
    registry.add(ServerB.class, new ServerB());
    registry.add(ServerC.class, new ServerC());
    registry.add(ServerD.class, new ServerD());

    Assert.assertThrows(RuntimeException.class, registry::getServers);
  }