Unit test for resize memory