// Get the AdGroupCriterionService.
AdGroupCriterionServiceInterface adGroupCriterionService =
adWordsServices.get(session, AdGroupCriterionServiceInterface.class);
// Create experiment.
Experiment experiment = new Experiment();
experiment.setCampaignId(campaignId);
experiment.setName("Interplanetary Experiment #" + System.currentTimeMillis());
experiment.setQueryPercentage(10);
experiment.setStartDateTime(new DateTime().plusDays(1).toString("yyyyMMdd HHmmss Z"));
// You can optionally provide these field(s).
experiment.setEndDateTime(new DateTime().plusDays(30).toString("yyyyMMdd HHmmss Z"));
// Create operation.
ExperimentOperation experimentOperation = new ExperimentOperation();
experimentOperation.setOperand(experiment);
experimentOperation.setOperator(Operator.ADD);