added unit test for dynamic array