Add test and test fixture, optimize array initialization