Added a test with memory mode and explicitly set default mode