Added unit test for operator[].