@Test
void can_initialize_expression_filter_script() throws IOException {

  when(searchLookup.getLeafSearchLookup(leafReaderContext)).thenReturn(leafSearchLookup);
  AggregationScript.LeafFactory leafFactory = factory.newFactory(params, searchLookup);
  assertFalse(leafFactory.needs_score());
  AggregationScript actualScript = leafFactory.newInstance(leafReaderContext);
  assertEquals(
      new ExpressionAggregationScript(expression, searchLookup, leafReaderContext, params),
      actualScript
  );
}