@Test
public void testSaveSingleNullHBaseTableConnection() throws Exception {

    Document expectedDocument = new Document();
    expectedDocument.setId(UUID.randomUUID().toString());
    expectedDocument.setTimestamp(System.currentTimeMillis());
    JsonNode data = mapper.valueToTree(Collections.singletonMap("TEST_NAME", "SINGLE_SAVE_TEST"));
    expectedDocument.setData(data);
    when(hBaseTableConnection.getTable(Matchers.<Table>any())).thenReturn(null);
    try {
        HBaseDataStore.save(TEST_APP, expectedDocument);
        fail();
    } catch (DataStoreException ex) {
        assertEquals(DataStoreException.ErrorCode.STORE_SINGLE_SAVE, ex.getErrorCode());
    }
}