MergeFieldsStage extends AbstractProcessStage { public void init() throws RequiredArgumentMissingException { if(outputField == null) { throw new RequiredArgumentMissingException("Missing required parameter 'outputField'"); } if(fromFields == null) { throw new RequiredArgumentMissingException("Missing required parameter 'fromFields'"); } }  void init(); @Override void process(LocalDocument doc); void setOutputField(String outputField); void setFromFields(List<String> fromFields); void setClearOutputField(boolean clearOutputField); void setSeparator(String separator); void setAdditionIfNumbers(boolean additionIfNumbers); void setCreateList(boolean createList);  }
@Test public void testInit() throws Exception { MergeFieldsStage mfs = new MergeFieldsStage(); try { mfs.init(); Assert.fail("Did not throw RequiredArgumentMissing"); } catch(RequiredArgumentMissingException e) { } mfs.setOutputField("out"); mfs.setFromFields(new ArrayList<String>()); mfs.init(); }