update unit test to test fromArray method