replace method tests