@Test public void testExplicitPivotTableStart() throws Exception { customizer.customize(getComponent(), new HashMap<>()); Exchange inbound = new DefaultExchange(createCamelContext()); GooglePivotTable model = new GooglePivotTable(); model.setStart("C12"); model.setSpreadsheetId(getSpreadsheetId()); model.setSourceRange("A1:D10"); model.setValueGroups(Collections.singletonList(sampleValueGroup())); inbound.getIn().setBody(model); getComponent().getBeforeProducer().process(inbound); Assert.assertNotNull(inbound.getIn().getHeader(GoogleSheetsStreamConstants.SPREADSHEET_ID)); Assert.assertEquals(model.getSpreadsheetId(), inbound.getIn().getHeader(GoogleSheetsStreamConstants.SPREADSHEET_ID)); BatchUpdateSpreadsheetRequest batchUpdateRequest = (BatchUpdateSpreadsheetRequest) inbound.getIn().getHeader(GoogleSheetsConstants.PROPERTY_PREFIX + "batchUpdateSpreadsheetRequest"); Assert.assertEquals(1, batchUpdateRequest.getRequests().size()); UpdateCellsRequest updateCellsRequest = batchUpdateRequest.getRequests().get(0).getUpdateCells(); Assert.assertEquals(Integer.valueOf(0), updateCellsRequest.getStart().getSheetId()); Assert.assertEquals(Integer.valueOf(2), updateCellsRequest.getStart().getColumnIndex()); Assert.assertEquals(Integer.valueOf(11), updateCellsRequest.getStart().getRowIndex()); PivotTable pivotTable = updateCellsRequest.getRows().get(0).getValues().get(0).getPivotTable(); assertSampleValueGroup(pivotTable); }
@Override public void customize(ComponentProxyComponent component, Map<String, Object> options) { setApiMethod(options); component.setBeforeProducer(this::beforeProducer); }
GoogleSheetsAddPivotTableCustomizer implements ComponentProxyCustomizer { @Override public void customize(ComponentProxyComponent component, Map<String, Object> options) { setApiMethod(options); component.setBeforeProducer(this::beforeProducer); } }
GoogleSheetsAddPivotTableCustomizer implements ComponentProxyCustomizer { @Override public void customize(ComponentProxyComponent component, Map<String, Object> options) { setApiMethod(options); component.setBeforeProducer(this::beforeProducer); }  }
GoogleSheetsAddPivotTableCustomizer implements ComponentProxyCustomizer { @Override public void customize(ComponentProxyComponent component, Map<String, Object> options) { setApiMethod(options); component.setBeforeProducer(this::beforeProducer); }  @Override void customize(ComponentProxyComponent component, Map<String, Object> options); }
GoogleSheetsAddPivotTableCustomizer implements ComponentProxyCustomizer { @Override public void customize(ComponentProxyComponent component, Map<String, Object> options) { setApiMethod(options); component.setBeforeProducer(this::beforeProducer); }  @Override void customize(ComponentProxyComponent component, Map<String, Object> options);  }