Mockito.any(SolrInputDocument.class), Mockito.eq(1337));
}
@Test
public void testFieldConfig() throws Exception {
LocalDocument doc = new LocalDocument();
doc.putContentField("name", "jens");
doc.putContentField("reference", "http://www.giantbomb.com");
List<String> multiValued = new ArrayList<String>();
multiValued.add("james bond");
multiValued.add("heman");
doc.putContentField("hero", multiValued);
doc.putContentField("explode", "boom");
Map<String, Object> fieldMappings = new HashMap<String, Object>();
fieldMappings.put("name", "fullname");
fieldMappings.put("reference", "url");
fieldMappings.put("doesnotexist", "doesnotmatter");
fieldMappings.put("hero", "heroes");
fieldMappings.put("explode", Arrays.asList(new String[] {"explode1", "explode2", "explode3"}));
solrOutput.setFieldMappings(fieldMappings);
SolrInputDocument inputDoc = solrOutput
.createSolrInputDocumentWithFieldConfig(doc);
assertEquals(inputDoc.getFieldValue("fullname"), doc
.getContentField("name").toString());
assertArrayEquals(multiValued.toArray(), inputDoc
.getFieldValues("heroes").toArray());
assertEquals(inputDoc.getFieldValue("explode1"), doc.getContentField("explode"));
assertEquals(inputDoc.getFieldValue("explode2"), doc.getContentField("explode"));
assertEquals(inputDoc.getFieldValue("explode3"), doc.getContentField("explode"));
}