@Test
public void testSaveBulkNullHBaseTableConnection() throws Exception {

    List<Document> documents = new Vector<Document>();
    for (int i = 0; i < 10; i++) {
        documents.add(new Document(UUID.randomUUID().toString(),
                System.currentTimeMillis(),
                mapper.valueToTree(Collections.singletonMap("TEST_NAME", "BULK_SAVE_TEST"))));
    }
    when(hBaseTableConnection.getTable(Matchers.<Table>any())).thenReturn(null);
    try {
        HBaseDataStore.save(TEST_APP, documents);
        fail();
    } catch (DataStoreException ex) {
        assertEquals(DataStoreException.ErrorCode.STORE_MULTI_SAVE, ex.getErrorCode());
    }
}