public void testAsyncOverwriteWithNonIndexedValue() throws Exception {
final long id = 10;
cache.put(id, new TestEntity("name1", "surname1", id, "note"));
CacheQuery q1 = queryByNameField("name1", TestEntity.class);
assertEquals(1, q1.getResultSize());
assertEquals(TestEntity.class, q1.list().get(0).getClass());
Map<Object, Object> map = new HashMap<Object, Object>();
map.put(id, new NotIndexedType("name2"));
Future futureTask = cache.putAllAsync(map);
futureTask.get();
assertTrue(futureTask.isDone());
CacheQuery q2 = queryByNameField("name1", TestEntity.class);
assertEquals(0, q2.getResultSize());
CacheQuery q3 = queryByNameField("name2", TestEntity.class);
assertEquals(0, q3.getResultSize());
}