@Test public void testHint() throws Exception { MongoItemReader<String> reader = getBasicBuilder() .hint("{ $natural : 1}") .build(); when(this.template.find(this.queryContainer.capture(), eq(String.class))).thenReturn(new ArrayList<>()); assertNull("reader should not return result", reader.read()); Query query = this.queryContainer.getValue(); assertEquals("{ $natural : 1}", query.getHint()); }