@Test
public void testAdd_MultipleDocumentsWithTheirOwnIds() {

    
    String idA = DOCUMENT_ID + "A";
    String idB = DOCUMENT_ID + "B";
    
    IdAddingSolrUpdateWriter updateWriter = new IdAddingSolrUpdateWriter(
            UNIQUE_KEY_FIELD, DOCUMENT_ID, null, TABLE_NAME, updateCollector);
    
    SolrInputDocument docA = mock(SolrInputDocument.class);
    SolrInputDocument docB = mock(SolrInputDocument.class);
    
    SolrInputField keyFieldA = new SolrInputField(UNIQUE_KEY_FIELD);
    keyFieldA.setValue(idA, 1.0f);
    SolrInputField keyFieldB = new SolrInputField(UNIQUE_KEY_FIELD);
    keyFieldB.setValue(idB, 1.0f);
    
    
    when(docA.getField(UNIQUE_KEY_FIELD)).thenReturn(keyFieldA);
    when(docB.getField(UNIQUE_KEY_FIELD)).thenReturn(keyFieldB);
    updateWriter.add(docA);
    updateWriter.add(docB);
    verify(updateCollector).add(idA, docA);
    verify(updateCollector).add(idB, docB);
}