Refactor ShelfTest