Adding test to memory.go implementation