@Test
public void testClose() throws SolrServerException, IOException {

    SolrInputDocument doc = mock(SolrInputDocument.class);
    bufferedWriter.add(-1, ImmutableMap.of("a", doc));
    bufferedWriter.close();
    verify(delegateWriter).add(eq(-1), eq(ImmutableMap.of("a", doc)));
    verify(delegateWriter).close();
    verify(docCounter).increment(1L);
}