@Test
public void testAdd() throws SolrServerException, IOException, InterruptedException {

    SolrInputDocument solrInputDoc = mock(SolrInputDocument.class);
    mrWriter.add(-1, ImmutableMap.of("docId", solrInputDoc));
    
    ArgumentCaptor<SolrInputDocumentWritable> docWritableCaptor =
            ArgumentCaptor.forClass(SolrInputDocumentWritable.class);
    
    verify(context).write(eq(new Text("docId")), docWritableCaptor.capture());
    
    assertSame(solrInputDoc, docWritableCaptor.getValue().getSolrInputDocument());
}