@Test
public void testAdd_IdAlreadyPresent() {

    IdAddingSolrUpdateWriter updateWriter = new IdAddingSolrUpdateWriter(
            UNIQUE_KEY_FIELD, DOCUMENT_ID, null, TABLE_NAME, updateCollector);
    
    
    SolrInputField solrIdField = new SolrInputField(DOCUMENT_ID);
    solrIdField.setValue(DOCUMENT_ID, 1.0f);
    
    when(solrDoc.getField(UNIQUE_KEY_FIELD)).thenReturn(solrIdField);
    updateWriter.add(solrDoc);
    verify(updateCollector).add(DOCUMENT_ID, solrDoc);
}