@Test
@ClientCompatibleTest
public void alterAndGet_whenException() {
HazelcastInstance hazelcastInstance = createHazelcastInstance();
IAtomicLong ref = hazelcastInstance.getAtomicLong("alterAndGet_whenException");
ref.set(10);
try {
ref.alterAndGet(new FailingFunction());
fail();
} catch (WoohaaException expected) {
}
assertEquals(10, ref.get());
}