final TransactionContext context = client.newTransactionContext();
context.beginTransaction();
final TransactionalMap txMap = context.getMap(mapName);
txMap.replace(key1, oldValue1, newValue1);
txMap.replace(key2, "NOT_OLD_VALUE", "NEW_VALUE_CANT_BE_THIS");
context.commitTransaction();
assertEquals(newValue1, map.get(key1));
assertEquals(oldValue2, map.get(key2));