final String mapName = randomString();
IMap map = client.getMap(mapName);
map.put("key1", "value1");
final TransactionContext context = client.newTransactionContext();
context.beginTransaction();
final TransactionalMap<Object, Object> txMap = context.getMap(mapName);
assertNull(txMap.put("key2", "value2"));
assertEquals(2, txMap.size());
assertEquals(2, txMap.keySet().size());