TEST(QueryProjectionTest, ProjectionWithFieldPathExpressionDoesNotNeedWholeDocument) {
    auto proj = createProjection("{}", "{_id: 0, a: {$add: ['$b', '$c']}}");
    ASSERT_FALSE(proj.isSimple());
    ASSERT_FALSE(proj.requiresDocument());

    const auto& fields = proj.getRequiredFields();
    ASSERT_EQ(fields.size(), 2);
    ASSERT_EQ(fields[0], "b");
    ASSERT_EQ(fields[1], "c");
}
TEST(QueryProjectionTest, ProjectionWithFieldPathExpressionDoesNotNeedWholeDocument) {
    auto proj = createProjection("{}", "{_id: 0, a: {$add: ['$b', '$c']}}");
    ASSERT_FALSE(proj.isSimple());
    ASSERT_FALSE(proj.requiresDocument());

    const auto& fields = proj.getRequiredFields();
    ASSERT_EQ(fields.size(), 2);
    ASSERT_EQ(fields[0], "b");
    ASSERT_EQ(fields[1], "c");
}