Add operateOnMemory tests
Add operateOnMemory