protected void deleteNode(NodeEvent event) {
        String nodeName = event.getNodeName();
        Map<String, DataSource> map = highAvailableDataSource.getDataSourceMap();
        if (nodeName == null || nodeName.isEmpty() || !map.containsKey(nodeName)) {
            return;
        }
        map = highAvailableDataSource.getAvailableDataSourceMap();
        if (!allowEmptyPool && map.size() == 1 && map.containsKey(nodeName)) {
            LOG.warn(nodeName + " is the only DataSource left, don't remove it.");
            return;
        }
        blacklistNode(nodeName);
    }
@Test
    public void testDeleteNode() {
        haDataSource.getDataSourceMap().put("foo", new MockDataSource("foo"));
        haDataSource.getDataSourceMap().put("bar", new MockDataSource("bar"));

        NodeEvent event = new NodeEvent();
        event.setNodeName("foo");
        event.setType(NodeEventTypeEnum.DELETE);
        updater.deleteNode(event);
        validateDeleteNode();
    }