@Test public void testCreateDocument() throws CASException, IOException{ Document document = documentBuilder.createDocument(fields); assertEquals(field1, document.getField("field1")); assertEquals(field2, document.getField("field2")); }
public Document createDocument(Collection<Field> fields) { Document document = new Document(); for (Field field : fields) { document.add(field); } return document; }
DocumentBuilder { public Document createDocument(Collection<Field> fields) { Document document = new Document(); for (Field field : fields) { document.add(field); } return document; } }
DocumentBuilder { public Document createDocument(Collection<Field> fields) { Document document = new Document(); for (Field field : fields) { document.add(field); } return document; } DocumentBuilder(); }
DocumentBuilder { public Document createDocument(Collection<Field> fields) { Document document = new Document(); for (Field field : fields) { document.add(field); } return document; } DocumentBuilder(); Document createDocument(Collection<Field> fields); }
DocumentBuilder { public Document createDocument(Collection<Field> fields) { Document document = new Document(); for (Field field : fields) { document.add(field); } return document; } DocumentBuilder(); Document createDocument(Collection<Field> fields);  }