ProjectionOperation operation = new ProjectionOperation().and(fieldName).divide(1).as(fieldAlias);
DBObject dbObject = operation.toDBObject(Aggregation.DEFAULT_CONTEXT);
DBObject projectClause = DBObjectTestUtils.getAsDBObject(dbObject, PROJECT);
DBObject oper = exctractOperation(fieldAlias, projectClause);
assertThat(oper.containsField(DIVIDE), is(true));
assertThat(oper.get(DIVIDE), is((Object) Arrays.<Object> asList("$a", 1)));
}
@Test(expected = IllegalArgumentException.class)
public void arithmenticProjectionOperationDivideByZeroException() {