### Question:
Snippets { public BatchUpdatePresentationResponse simpleTextReplace( String presentationId, String shapeId, String replacementText) throws IOException { Slides slidesService = this.service; List<Request> requests = new ArrayList<>(); requests.add(new Request() .setDeleteText(new DeleteTextRequest() .setObjectId(shapeId) .setTextRange(new Range() .setType("ALL")))); requests.add(new Request() .setInsertText(new InsertTextRequest() .setObjectId(shapeId) .setInsertionIndex(0) .setText(replacementText))); BatchUpdatePresentationRequest body = new BatchUpdatePresentationRequest().setRequests(requests); BatchUpdatePresentationResponse response = slidesService.presentations().batchUpdate(presentationId, body).execute(); System.out.println("Replaced text in shape with ID: " + shapeId); return response; } Snippets(Slides service, Drive driveService, Sheets sheetsService); String createPresentation(String title); String copyPresentation(String presentationId, String copyTitle); BatchUpdatePresentationResponse createSlide(String presentationId); BatchUpdatePresentationResponse createTextBoxWithText(
            String presentationId, String slideId); BatchUpdatePresentationResponse createImage(String presentationId,
                                                       String slideId,
                                                       GoogleCredential credential); List<BatchUpdatePresentationResponse> textMerging(
            String templatePresentationId, String dataSpreadsheetId); BatchUpdatePresentationResponse imageMerging(String templatePresentationId,
                                                        String imageUrl,
                                                        String customerName); BatchUpdatePresentationResponse simpleTextReplace(
            String presentationId, String shapeId, String replacementText); BatchUpdatePresentationResponse textStyleUpdate(String presentationId, String shapeId); BatchUpdatePresentationResponse createBulletedText(String presentationId,
                                                              String shapeId); BatchUpdatePresentationResponse createSheetsChart(
            String presentationId, String pageId, String spreadsheetId, Integer sheetChartId); BatchUpdatePresentationResponse refreshSheetsChart(
            String presentationId, String presentationChartId);  }### Answer:
@Test public void testSimpleTextReplace() throws IOException { String presentationId = this.createTestPresentation(); String pageId = this.createTestSlide(presentationId); String boxId = this.createTestTextBox(presentationId, pageId); BatchUpdatePresentationResponse response = this.snippets.simpleTextReplace(presentationId, boxId, "MY NEW TEXT"); assertEquals(2, response.getReplies().size()); }