/**
* Test removing a campaign criterion.
*/
public void testRemove() throws Exception {
// Create a campaign criteria
CampaignCriterion criterion = new CampaignCriterion();
criterion.setCampaignId(campaignId);
criterion.setCriterion(new Criterion(criterionId, null));
// Create operation
CampaignCriterionOperation operation = new CampaignCriterionOperation();
operation.setOperand(criterion);
operation.setOperator(Operator.REMOVE);
// Remove campaign criteria
CampaignCriterionReturnValue result = service
.mutate(new CampaignCriterionOperation[] {operation});
CampaignCriterion testCriterion = (CampaignCriterion) result.getValue()[0];
assertEquals(criterion.getCriterion().getId(), testCriterion.getCriterion().getId());
}