Added test for IndexError in test_get_piece