Tests to cover IndexOutOfBoundsExceptions for get and replace