@Test public void testBuild() throws Exception { ActionBuilderModule<Citations, Result> module = factory.instantiate(config); CitationEntry citationEntry = buildCitationEntry(); Citations.Builder builder = Citations.newBuilder(); builder.setDocumentId(docId); builder.setCitations(Lists.newArrayList(citationEntry)); List<AtomicAction<Result>> actions = module.build(builder.build()); assertNotNull(actions); assertEquals(1, actions.size()); AtomicAction<Result> action = actions.get(0); assertNotNull(action); assertEquals(Result.class, action.getClazz()); assertOaf(action.getPayload(), citationEntry); }
@Override public ActionBuilderModule<Citations, Result> instantiate(Configuration config) { return new CitationActionBuilderModule(provideTrustLevelThreshold(config)); }
CitationsActionBuilderModuleFactory extends AbstractActionBuilderFactory<Citations, Result> { @Override public ActionBuilderModule<Citations, Result> instantiate(Configuration config) { return new CitationActionBuilderModule(provideTrustLevelThreshold(config)); } }
CitationsActionBuilderModuleFactory extends AbstractActionBuilderFactory<Citations, Result> { @Override public ActionBuilderModule<Citations, Result> instantiate(Configuration config) { return new CitationActionBuilderModule(provideTrustLevelThreshold(config)); } CitationsActionBuilderModuleFactory(); }
CitationsActionBuilderModuleFactory extends AbstractActionBuilderFactory<Citations, Result> { @Override public ActionBuilderModule<Citations, Result> instantiate(Configuration config) { return new CitationActionBuilderModule(provideTrustLevelThreshold(config)); } CitationsActionBuilderModuleFactory(); @Override ActionBuilderModule<Citations, Result> instantiate(Configuration config); }
CitationsActionBuilderModuleFactory extends AbstractActionBuilderFactory<Citations, Result> { @Override public ActionBuilderModule<Citations, Result> instantiate(Configuration config) { return new CitationActionBuilderModule(provideTrustLevelThreshold(config)); } CitationsActionBuilderModuleFactory(); @Override ActionBuilderModule<Citations, Result> instantiate(Configuration config);  }