public void testQueryDuringAndAfterMigrationWithIndex() throws Exception {
Config cfg = new Config();
TestHazelcastInstanceFactory nodeFactory = createHazelcastInstanceFactory(4);
final HazelcastInstance h1 = nodeFactory.newHazelcastInstance(cfg);
IMap imap = h1.getMap("employees");
imap.addIndex("name", false);
imap.addIndex("age", true);
imap.addIndex("active", false);
int size = 500;
for (int i = 0; i < size; i++) {
imap.put(String.valueOf(i), new Employee("joe" + i, i % 60, ((i & 1) == 1), (double) i));