use of org.icij.datashare.com.Publisher in project datashare by ICIJ.
the class ResumeNlpTaskTest method test_bug_size_of_search.
@Test
public void test_bug_size_of_search() throws Exception {
for (int i = 0; i < 20; i++) {
indexer.add(TEST_INDEX, createDoc("doc" + i).with(Pipeline.Type.CORENLP).build());
}
Publisher publisher = mock(Publisher.class);
ResumeNlpTask resumeNlpTask = new ResumeNlpTask(publisher, indexer, new PropertiesProvider(new HashMap<String, String>() {
{
put("defaultProject", "test-datashare");
}
}), new User("test"), new HashSet<Pipeline.Type>() {
{
add(Pipeline.Type.OPENNLP);
}
});
resumeNlpTask.call();
verify(publisher, times(22)).publish(any(), any());
}
Aggregations