}
@Test(timeout = 20000)
public void testAddIndex_WithSlowProxyEstablishment() throws Exception {
Client client = new Client(ILuceneServer.class, _protocol);
INodeProxyManager proxyCreator = client.getProxyManager();
INodeProxyManager proxyCreatorSpy = spy(proxyCreator);
PauseAnswer<Void> pauseAnswer = new PauseAnswer<Void>(null);
doAnswer(new ChainedAnswer(pauseAnswer, new CallsRealMethods())).when(proxyCreatorSpy).getProxy(anyString(),
eq(true));
client.setProxyCreator(proxyCreatorSpy);
IndexMetaData indexMD = deployIndex(INDEX_NAME, INDEX_FILE, getNodeCount());