Can you replace the integration this with a mocked unit test that just tests the value() call in the ShardNumDocsExpression?