### Question:
Snippets { public BatchUpdatePresentationResponse createSheetsChart( String presentationId, String pageId, String spreadsheetId, Integer sheetChartId) throws IOException { Slides slidesService = this.service; List<Request> requests = new ArrayList<>(); Dimension emu4M = new Dimension().setMagnitude(4000000.0).setUnit("EMU"); String presentationChartId = "MyEmbeddedChart"; requests.add(new Request() .setCreateSheetsChart(new CreateSheetsChartRequest() .setObjectId(presentationChartId) .setSpreadsheetId(spreadsheetId) .setChartId(sheetChartId) .setLinkingMode("LINKED") .setElementProperties(new PageElementProperties() .setPageObjectId(pageId) .setSize(new Size() .setHeight(emu4M) .setWidth(emu4M)) .setTransform(new AffineTransform() .setScaleX(1.0) .setScaleY(1.0) .setTranslateX(100000.0) .setTranslateY(100000.0) .setUnit("EMU"))))); BatchUpdatePresentationRequest body = new BatchUpdatePresentationRequest().setRequests(requests); BatchUpdatePresentationResponse response = slidesService.presentations().batchUpdate(presentationId, body).execute(); System.out.println("Added a linked Sheets chart with ID " + presentationChartId); 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 testCreateSheetsChart() throws IOException { String presentationId = this.createTestPresentation(); String pageId = this.createTestSlide(presentationId); BatchUpdatePresentationResponse response = this.snippets.createSheetsChart( presentationId, pageId, DATA_SPREADSHEET_ID, CHART_ID); assertEquals(1, response.getReplies().size()); String chartId = response.getReplies().get(0).getCreateSheetsChart().getObjectId(); assertNotNull(chartId); }